/* --- General & Body Styles --- */
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");

:root {
    --primary-color: #F97316; /* Vibrant Orange */
    --primary-color-hover: #FB923C;
    --background-primary: #FFFFFF; /* White */
    --background-secondary: #F1F5F9; /* Light Gray */
    --text-primary: #1E293B; /* Dark Blue */
    --text-secondary: #334155;
    --border-color: #E2E8F0;
    --card-hover-shadow: rgba(0,0,0,0.07);
    --border-radius: 12px;
}

/* 2. Dark Theme Overrides */
[data-theme="dark"] {
    --background-primary: #0F172A; /* Dark Navy */
    --background-secondary: #1E293B; /* Slightly lighter navy */
    --text-primary: #F1F5F9; /* Light Gray */
    --text-secondary: #94A3B8; /* Muted Gray */
    --border-color: #334155;
    --card-hover-shadow: rgba(0,0,0,0.2);
}

[data-accent-color="blue"] {
    --primary-color: #3B82F6;
    --primary-color-hover: #60A5FA;
}

[data-accent-color="teal"] {
    --primary-color: #14B8A6;
    --primary-color-hover: #2DD4BF;
}

[data-accent-color="rose"] {
    --primary-color: #F43F5E;
    --primary-color-hover: #FB7185;
}

body {
    font-family: 'Poppins', 'Cairo', sans-serif; /* <-- ADD 'Cairo' HERE */
    margin: 0;
    line-height: 1.6;
    color: var(--text-secondary);
    background-color: var(--background-primary);
}

a,
a:visited {
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-color-hover);
}

.btn,
.btn:visited {
    color: inherit;
}

button,
input,
select,
textarea {
    font-family: 'Poppins', 'Cairo', sans-serif; /* Use the same font stack as the body */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h3, h4 {
    color: var(--text-primary);
    font-weight: 600;
}

/* NEW: Section titles are now orange */
h2 {
    color: var(--primary-color);
    font-weight: 700;
}

/* Global: prevent horizontal scroll on mobile */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Make all elements respect the viewport width */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Media should never overflow */
img, video, canvas, svg, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent long paragraphs/strings from overflowing WITHOUT breaking the whole UI */
p, li, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

html, body{
  height: 100%;
}

body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Your main content must expand */
main{
  flex: 1;
}

html{
  overflow-x: hidden;
}

html, body { height: 100%; }

body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Let the "content area" grow so footer goes to bottom.
   This targets common wrappers across your site. */
main,
.page-container,
.page-content,
.main-content{
  flex: 1 0 auto;
  min-height: 0; /* prevents weird overflow interactions */
}

/* Footer should never be fixed/absolute globally */
footer{
  flex-shrink: 0;
  margin-top: auto;
  position: relative;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--background-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .container > .logo { order: 1; }
header .container > .nav-links { order: 2; }
header .container > a.btn.btn-secondary { order: 3; }
header .container > .hamburger { order: 4; }

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
}

.logo-img {
    height: 35px;
    margin-right: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.3s ease;
}

/* NEW: Bolder active link style */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.landing-page .landing-nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-context-icon {
    font-size: 18px;
    line-height: 1;
}

.nav-links a:hover::after, .nav-links a.active::after {
    transform: scaleX(1);
}

/* --- Buttons --- */
.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.btn-primary:visited {
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-color-hover); /* Lighter orange on hover */
    border-color: #FB923C;
}

.btn-secondary {
    background-color: color-mix(in srgb, var(--primary-color) 12%, var(--background-primary));
    color: var(--primary-color);
    border: 1px solid color-mix(in srgb, var(--primary-color) 35%, var(--border-color));
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary-color) 12%, transparent);
}

header nav > a.btn.btn-secondary {
    color: color-mix(in srgb, currentColor 88%, transparent);
}

.btn-secondary:visited {
    color: var(--primary-color);
}

[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-secondary:visited {
    color: #fff;
    border-color: var(--primary-color);
    background-color: color-mix(in srgb, var(--primary-color) 78%, #000000 22%);
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Cross-browser scrollbar theming */
* {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color)) var(--background-secondary);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
*::-webkit-scrollbar-track {
    background: var(--background-secondary);
}
*::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary-color) 35%, var(--border-color));
    border-radius: 999px;
    border: 2px solid var(--background-secondary);
}

/* --- Hero Section --- */
.hero-section {
    padding: 80px 0;
    background-color: var(--background-primary); /* Changed to white for better contrast with next section */
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text h1 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-text p {
    font-size: 18px;
}

.hero-image img {
    max-width: 450px;
}

/* --- Courses Section --- */
.courses-section {
    padding: 80px 0;
    background-color: var(--background-secondary); /* Added light gray background here */
}

.courses-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.course-card {
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

.course-icon img {
    height: 60px;
    margin-bottom: 20px;
}

.course-card h3 {
    margin-bottom: 10px;
}

.course-card .btn {
    margin-top: 20px;
    display: inline-block;
}

/* --- Footer --- */
/* NEW: Orange footer */
footer {
    background-color: var(--primary-color);
    color: var(--background-primary);
    padding: 30px 0;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
        position: relative; /* CRITICAL: This is the anchor for our button */
    /* Add a little more padding for better spacing */
}

.footer-links a {
    color: var(--background-primary);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
}

/* --- COURSE DETAILS PAGE --- */
.course-page-main {
    padding: 50px 0;
}

.breadcrumb {
    margin-bottom: 30px;
    color: #64748B;
}
.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.course-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.course-subtitle {
    font-size: 18px;
    font-style: italic;
    color: #64748B;
}

/* NEW: Orange list checkmarks */
.course-info ul {
    list-style: none;
    padding-left: 0;
}
.course-info ul li {
    padding-left: 25px;
    margin-bottom: 10px;
    position: relative;
}
.course-info ul li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.module {
    background: var(--background-secondary);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color); /* Added orange accent border */
}
.module-title {
    margin: 0 0 5px 0;
}
.module-desc {
    margin: 0;
    font-size: 14px;
}

.enroll-card {
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    position: sticky;
    top: 100px;
}

.course-thumbnail {
    width: 100%;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.enroll-card-body {
    padding: 20px;
}

.price-placeholder {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 15px;
}

.btn-full {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 18px;
}

.enroll-card-body h4 {
    margin-top: 25px;
}
.enroll-card-body ul {
    list-style: none;
    padding: 0;
}
.enroll-card-body ul li {
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
}
/* NEW: Orange checkmarks in enroll card */
.enroll-card-body ul li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.discussion-section {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.disqus-placeholder {
    background-color: var(--background-secondary);
    padding: 40px;
    text-align: center;
    border-radius: var(--border-radius);
    border: 2px dashed #CBD5E1;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .course-grid {
        grid-template-columns: 1fr 1fr;
    }
    .course-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .course-grid {
        grid-template-columns: 1fr;
    }
    .hero-text h1 {
        font-size: 36px;
    }
}

/* --- NEW STYLES FOR ADDITIONAL PAGES --- */

/* --- General Page Layout --- */
.page-main {
    padding: 60px 0;
}
.page-header {
    /* NEW: Use Flexbox for alignment */
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center;   /* Center them horizontally */
    position: relative;    /* Set a positioning context */
    text-align: center;
    margin-bottom: 50px;
}
.page-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}
.page-header p {
    font-size: 18px;
    color: #64748B;
    max-width: 600px;
    margin: 0 auto;
}


/* --- NEW STYLES FOR NOTES LIBRARY --- */

/* --- Notes Hub Page (notes.html) --- */
.subjects-section {
    margin-bottom: 50px;
}

.subjects-section h2 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-size: 28px;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.subject-card {
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}
.subject-card:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}


/* --- Subject-Specific Notes Page --- */


.notes-section {
    margin-bottom: 60px;
}

.notes-section h2 {
    font-size: 28px;
    margin-bottom: 30px;
}

.notes-grid {
    display: grid; /* This is the key: it activates the grid layout. */
    
    /* 1. Desktop Layout: 3 columns */
    grid-template-columns: repeat(3, 1fr); /* Creates 3 equal-width columns */
    gap: 30px; /* Sets the spacing between the note cards */
}

/* 1. The "Picture Frame" Container */
.note-preview {
    position: relative; /* Establishes a positioning context for the canvas */
    width: 100%;
    aspect-ratio: 1 / 1.41; /* Forces a consistent A4-like portrait shape for all frames */
    background-color: var(--border-color); /* A neutral background for letterboxing */
    border-bottom: 1px solid var(--border-color);
    overflow: hidden; /* Ensures nothing spills out */
}

/* 2. The "Photo" (The Canvas Itself) */
.note-preview canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* The most important property: */
    object-fit: contain; /* Scales the content to fit inside the frame without cropping or distortion */
}

.note-author {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 8px;
}

.community-notes-cta {
    background: #EFF6FF;
    color: #1E40AF;
    border-left: 4px solid #3B82F6;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}
.community-notes-cta p {
    margin: 0;
}
.community-notes-cta strong {
    display: block;
    margin-bottom: 5px;
}

/* 2. Tablet Layout: 2 columns */
@media (max-width: 992px) {
    .notes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 3. Mobile Layout: 1 column */
@media (max-width: 768px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
}

/* --- NEW STYLES FOR TOOLS PAGE V3 --- */

.tools-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.tool-description {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    min-height: 60px; /* Helps align the forms */
}

.result-box-single {
    background: var(--background-secondary);
    padding: 20px;
    text-align: center;
    border-radius: var(--border-radius);
    margin-top: 20px;
}
.result-box-single p {
    font-size: 38px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}
.result-box-single span {
    font-size: 14px;
    color: #64748B;
}

.result-info {
    font-size: 14px;
    text-align: center;
    margin-top: 15px;
    color: #475569;
}

.calculation-factors {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.calculation-factors h4 {
    margin-bottom: 10px;
}
.calculation-factors p {
    font-size: 14px;
    color: #475569;
    margin: 0;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.tool-card {
    display: block;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
    color: var(--primary-color);
}

.tool-card h3 {
    margin-top: 0;
}

.tool-card.disabled {
    background-color: var(--background-secondary);
    color: #94A3B8;
    cursor: not-allowed;
}
.tool-card.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* --- IMPROVED STYLES FOR INSULIN CALCULATOR --- */
#insulin-calculator.html .form-group, .preset-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px; /* Consistent spacing */
}

.preset-group select {
    padding: 10px;
    border: 1px solid #CBD5E1;
    border-radius: var(--border-radius);
    font-size: 16px;
    background-color: var(--background-primary);
}

.form-separator {
    text-align: center;
    margin: -10px 0 10px 0;
    color: #94A3B8;
    font-weight: 600;
}

/* --- Responsive Adjustments for Tools Layout --- */
@media (max-width: 992px) {
    .tools-layout {
        grid-template-columns: 1fr;
    }
    .tool-description {
        min-height: auto; /* Remove height alignment on mobile */
    }
}

/* --- Study Tools Page --- */
.study-tools-page {
    --study-ink: var(--text-primary);
    --study-muted: var(--text-secondary);
    --study-panel: color-mix(in srgb, var(--background-primary) 94%, var(--primary-color) 6%);
    --study-panel-strong: color-mix(in srgb, var(--background-primary) 86%, var(--primary-color) 14%);
    --study-border: color-mix(in srgb, var(--border-color) 70%, var(--primary-color) 30%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    padding: 104px 0 76px;
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--primary-color) 16%, transparent), transparent 26rem),
        radial-gradient(circle at 88% 22%, rgba(20, 184, 166, 0.14), transparent 24rem),
        linear-gradient(180deg, var(--background-primary) 0%, var(--background-secondary) 100%);
}

.study-tools-page::before,
.study-tools-page::after {
    content: "";
    position: absolute;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    filter: blur(46px);
    opacity: 0.5;
    pointer-events: none;
    animation: studyGlowDrift 18s ease-in-out infinite alternate;
}

.study-tools-page::before {
    top: 26rem;
    left: -10rem;
}

.study-tools-page::after {
    right: -9rem;
    bottom: 14rem;
    animation-delay: -7s;
}

.study-tools-hero,
.study-tools-overview,
.study-tool-section {
    position: relative;
    z-index: 1;
}

.study-tools-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.82fr);
    gap: clamp(28px, 5vw, 70px);
    align-items: center;
}

.study-tools-copy h1 {
    max-width: 680px;
    margin: 0;
    color: var(--study-ink);
    font-size: clamp(2.55rem, 6.2vw, 5.2rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: 0;
}

.study-tools-copy p {
    max-width: 600px;
    margin: 24px 0 0;
    color: var(--study-muted);
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.75;
}

.study-tools-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.study-tools-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
}

.study-tools-actions .material-icons {
    font-size: 20px;
}

.study-console,
.study-surface,
.study-feature-card,
.ai-tool-card,
.tool-card {
    border-radius: 8px;
}

.study-console {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--study-border);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--study-panel) 84%, #0f172a 16%), var(--study-panel)),
        var(--background-primary);
    box-shadow: 0 24px 70px color-mix(in srgb, var(--primary-color) 18%, rgba(15, 23, 42, 0.12));
}

.study-console::before {
    content: "";
    position: absolute;
    inset: -35%;
    background: conic-gradient(from 90deg, transparent, color-mix(in srgb, var(--primary-color) 20%, transparent), transparent 32%);
    opacity: 0.34;
    animation: studyConsoleSweep 16s linear infinite;
}

.study-console-topbar,
.study-console-main {
    position: relative;
    z-index: 1;
}

.study-console-topbar {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px solid var(--study-border);
    background: color-mix(in srgb, var(--background-primary) 72%, var(--primary-color) 8%);
}

.study-console-topbar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-color) 72%, #ffffff 28%);
    box-shadow: 0 0 14px color-mix(in srgb, var(--primary-color) 35%, transparent);
}

.study-console-main {
    display: grid;
    gap: 16px;
    padding: clamp(18px, 3vw, 28px);
}

.study-review-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--study-border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--background-primary) 84%, var(--primary-color) 8%);
}

.study-review-card .material-icons {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #fff;
    background: var(--primary-color);
}

.study-review-card strong,
.study-review-card b {
    color: var(--study-ink);
}

.study-review-card p {
    margin: 4px 0 0;
    color: var(--study-muted);
    font-size: 0.9rem;
}

.study-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.study-mini-grid > div,
.study-progress-row,
.study-console-list {
    border: 1px solid color-mix(in srgb, var(--study-border) 75%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--background-primary) 76%, var(--primary-color) 5%);
}

.study-mini-grid > div {
    padding: 16px;
}

.study-mini-grid span,
.study-progress-row span,
.study-console-list span,
.tool-card small {
    color: var(--study-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.study-mini-grid strong {
    display: block;
    margin: 8px 0 3px;
    color: var(--study-ink);
    font-size: 2rem;
    line-height: 1;
}

.study-mini-grid small {
    color: var(--study-muted);
}

.study-progress-row {
    padding: 16px;
}

.study-progress-row > div {
    height: 8px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--border-color) 60%, transparent);
}

.study-progress-row i,
.qbank-bars b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary-color), #14b8a6);
}

.study-console-list {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.study-console-list span {
    display: flex;
    align-items: center;
    gap: 9px;
    text-transform: none;
    letter-spacing: 0;
}

.study-console-list i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
}

.study-tools-overview {
    padding: 46px 0 18px;
}

.study-tools-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.study-feature-card,
.ai-tool-card {
    display: block;
    min-height: 100%;
    padding: 22px;
    border: 1px solid var(--study-border);
    background: color-mix(in srgb, var(--background-primary) 90%, var(--primary-color) 4%);
    color: var(--study-muted);
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.study-feature-card:hover,
.ai-tool-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--primary-color) 64%, var(--border-color));
    box-shadow: 0 18px 38px color-mix(in srgb, var(--primary-color) 14%, transparent);
}

.study-feature-card .material-icons,
.ai-tool-card .material-icons,
.study-section-copy > .material-icons,
.study-section-heading > .material-icons {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.study-feature-card h2,
.ai-tool-card h3 {
    margin: 18px 0 9px;
    color: var(--study-ink);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.25;
}

.study-feature-card p,
.ai-tool-card p {
    margin: 0;
    color: var(--study-muted);
    font-size: 0.94rem;
    line-height: 1.65;
}

.study-tool-section {
    padding: 70px 0;
}

.study-tool-section-alt {
    background: color-mix(in srgb, var(--background-primary) 72%, var(--primary-color) 4%);
}

.study-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1fr);
    gap: clamp(26px, 5vw, 62px);
    align-items: center;
}

.study-section-copy h2,
.study-section-heading h2 {
    max-width: 650px;
    margin: 18px 0 0;
    color: var(--study-ink);
    font-size: clamp(1.85rem, 3.4vw, 3.05rem);
    font-weight: 600;
    line-height: 1.08;
}

.study-section-copy p,
.study-section-heading p {
    max-width: 600px;
    margin: 18px 0 0;
    color: var(--study-muted);
    font-size: 1rem;
    line-height: 1.75;
}

.study-surface {
    padding: clamp(18px, 3vw, 30px);
    border: 1px solid var(--study-border);
    background: color-mix(in srgb, var(--background-primary) 90%, var(--primary-color) 4%);
    box-shadow: 0 22px 48px color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.flashcard-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 14px;
}

.flashcard-stack article {
    min-height: 168px;
    padding: 20px;
    border: 1px solid var(--study-border);
    border-radius: 8px;
    background: var(--background-primary);
}

.flashcard-stack small,
.qbank-header span {
    color: var(--study-muted);
    font-weight: 600;
}

.flashcard-stack h3 {
    margin: 18px 0 12px;
    color: var(--study-ink);
    font-size: 1.35rem;
    font-weight: 600;
}

.flashcard-stack p {
    margin: 0;
    color: var(--study-muted);
    line-height: 1.65;
}

.flashcard-stack strong {
    display: block;
    margin-top: 20px;
    color: var(--primary-color);
    font-size: 3rem;
    line-height: 1;
}

.flashcard-stack span {
    color: var(--study-muted);
}

.study-choice-row,
.qbank-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.study-choice-row button,
.qbank-actions button {
    min-height: 40px;
    border: 1px solid var(--study-border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--background-primary) 86%, var(--primary-color) 5%);
    color: var(--study-ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
}

.qbank-preview {
    display: grid;
    gap: 18px;
}

.qbank-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.qbank-header strong {
    color: var(--study-ink);
    font-size: 1.3rem;
}

.qbank-bars {
    display: grid;
    gap: 16px;
}

.qbank-bars label {
    display: grid;
    gap: 8px;
    color: var(--study-ink);
    font-weight: 600;
}

.qbank-bars i {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--border-color) 70%, transparent);
}

.qbank-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.study-section-heading {
    display: grid;
    justify-items: start;
    margin-bottom: 24px;
}

.ai-tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.calculators-section {
    padding-bottom: 20px;
}

.study-calculator-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.tool-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--study-border);
    background: color-mix(in srgb, var(--background-primary) 92%, var(--primary-color) 3%);
    color: var(--study-muted);
    box-shadow: none;
}

.tool-card::after {
    content: "";
    position: absolute;
    inset: auto -24px -36px auto;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-color) 14%, transparent);
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--primary-color) 62%, var(--border-color));
    box-shadow: 0 18px 38px color-mix(in srgb, var(--primary-color) 13%, transparent);
    color: var(--study-muted);
}

.tool-card:hover::after {
    opacity: 1;
}

.tool-card.featured {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 15%, var(--background-primary)), var(--background-primary));
}

.tool-card-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 16px;
    border-radius: 8px;
    color: #fff;
    background: var(--primary-color);
}

.tool-card h3 {
    margin: 8px 0 10px;
    color: var(--study-ink);
    font-size: 1.08rem;
    line-height: 1.28;
}

.tool-card p {
    margin: 0;
    color: var(--study-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.tool-card strong {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 18px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.tool-card strong .material-icons {
    font-size: 17px;
}

@keyframes studyGlowDrift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(42px, -34px, 0) scale(1.08); }
}

@keyframes studyConsoleSweep {
    to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
    .study-tools-hero-grid,
    .study-section-grid {
        grid-template-columns: 1fr;
    }

    .study-tools-feature-grid,
    .ai-tool-grid,
    .study-calculator-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .study-tools-page {
        padding-top: 88px;
    }

    .study-tools-actions,
    .study-choice-row,
    .qbank-actions {
        grid-template-columns: 1fr;
    }

    .study-tools-actions .btn {
        width: 100%;
    }

    .study-tools-feature-grid,
    .ai-tool-grid,
    .study-calculator-grid,
    .flashcard-stack {
        grid-template-columns: 1fr;
    }

    .study-console-main,
    .study-surface,
    .study-feature-card,
    .ai-tool-card,
    .tool-card {
        padding: 18px;
    }

    .study-review-card {
        grid-template-columns: auto 1fr;
    }

    .study-review-card b {
        grid-column: 2;
    }

    .study-tool-section {
        padding: 52px 0;
    }
}

/* --- About Us Page --- */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: flex-start;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.about-text h2 {
    margin-top: 0;
    font-size: 32px;
}

/* --- Contact Page --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
}
.contact-card h3 {
    margin-top: 0;
}

/* --- Responsive Adjustments for New Pages --- */
@media (max-width: 992px) {
    .about-layout, .contact-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* --- NEW STYLES FOR MOBILE NAVIGATION --- */

/* 1. Hamburger Icon Styling (hidden on desktop) */
.hamburger-menu {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
}

.hamburger-menu .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-primary);
    border-radius: 10px;
}


/* 2. Legacy responsive adjustments (non-nav only) */
@media (max-width: 768px) {
    /* Show the legacy hamburger icon (if any page still uses it) */
    .hamburger-menu {
        display: flex;
    }
    
    /* Further responsive fixes from previous steps */
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-text h1 {
        font-size: 36px;
    }
}

/* --- NEW STYLES FOR FREE COURSE CONTENT --- */

.hidden {
    display: none;
}

.modalHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modalHeader h3 {
    margin: 0;
}

.modal-close-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    background: var(--background-secondary);
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.section-divider {
    margin: 60px 0 30px 0;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.section-divider h2 {
    font-size: 28px;
}

.pdf-download-area {
    background-color: var(--background-secondary);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    margin-bottom: 50px;
}
.pdf-download-area h3 {
    margin-top: 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.video-card {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.video-card h4 {
    margin: 15px;
    font-size: 16px;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.choice-card {
    display: block;
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.choice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
    border-color: var(--primary-color);
}

.choice-card h2 {
    margin-top: 0;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .choice-grid {
        grid-template-columns: 1fr;
    }
}

/* --- NEW STYLES FOR EMPTY STATE CARD --- */

.empty-state-card {
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    /* This makes it take up the full width of the grid area */
    grid-column: 1 / -1; 
    margin-top: 20px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state-card h3 {
    color: var(--text-primary);
    margin-top: 0;
    font-size: 24px;
}

.empty-state-card p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.empty-state-cta {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.empty-state-cta p {
    font-size: 15px;
    line-height: 1.7;
}

.empty-state-cta .btn {
    margin-top: 10px;
}

/* --- NEW STYLES FOR TOOL TEMPLATE PAGE --- */
.calculator-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.tool-calculator h2 {
    margin-top: 0;
}

.interpretation-wrapper {
    background-color: var(--background-secondary);
    border-radius: var(--border-radius);
    padding: 30px;
    position: sticky;
    top: 100px;
}

.interpretation-wrapper h2 {
    margin-top: 0;
}

.interpretation-wrapper ul {
    padding-left: 20px;
}
.interpretation-wrapper ul li {
    margin-bottom: 10px;
}

.source-text {
    margin-top: 20px;
    font-size: 14px;
    color: #64748B;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
}

/* --- NEW STYLES FOR CHECKBOX INPUTS --- */

.form-group.checkbox-group {
    display: flex; /* Puts the box and text on the same line */
    flex-direction: row;
    align-items: center; /* Vertically aligns them */
    background-color: var(--background-secondary);
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    cursor: pointer; /* Makes the whole row feel clickable */
}

.form-group.checkbox-group:hover {
    background-color: var(--border-color); /* Slight hover effect */
}

.form-group.checkbox-group input[type="checkbox"] {
    width: 20px; /* Makes the checkbox larger and easier to click */
    height: 20px;
    margin-right: 15px; /* Adds space between the box and the text */
}

.form-group.checkbox-group label {
    margin-bottom: 0; /* Removes default label spacing */
    font-weight: normal;
    flex-grow: 1; /* Allows the label to take up the remaining space */
}

/* --- NEW STYLES FOR THEME SELECTOR --- */
.theme-selector {
    display: flex;
    gap: 5px;
    background-color: rgba(0,0,0,0.1);
    padding: 5px;
    border-radius: 8px;
}

.theme-btn {
    border: none;
    background-color: transparent;
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}
.theme-btn:hover {
    background-color: rgba(0,0,0,0.1);
}
.theme-btn.active {
    background-color: var(--background-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- NEW STYLES FOR FOOTER CONTROLS & COLOR SELECTOR --- */
.theme-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: absolute; /* Allows positioning within the footer */
    left: 50%;
    transform: translateX(-50%);
}

.color-selector {
    display: flex;
    gap: 5px;
    background-color: rgba(0,0,0,0.1);
    padding: 5px;
    border-radius: 20px; /* Pill shape */
}

.color-btn {
    width: 25px;
    height: 25px;
    border: 2px solid transparent;
    border-radius: 50%; /* Perfect circle */
    cursor: pointer;
    background-color: var(--swatch-color); /* Uses the color from the HTML style attribute */
    transition: all 0.2s ease;
}
.color-btn:hover {
    transform: scale(1.1);
}
.color-btn.active {
    border-color: var(--background-primary);
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* --- NEW STYLES FOR PAYMENT MODAL --- */

.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;

    /* --- THIS IS THE NEW LOGIC --- */
    overflow-y: auto;      /* The magic: Allows vertical scrolling if content is too tall */
    padding: 50px 20px;    /* Adds some breathing room at the top and bottom */
    display: flex;         /* We still use flex for easy horizontal centering */
    justify-content: center;
    align-items: flex-start; /* CRITICAL: This positions the modal at the top of the viewport */
}
.payment-modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.payment-modal {
    background: var(--background-primary);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    transform: scale(1);
    transition: transform 0.3s ease;
}
.payment-modal-overlay.hidden .payment-modal {
    transform: scale(0.95);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.modal-header h2 {
    margin: 0;
    font-size: 22px;
}

.payment-modal .modal-close-btn {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-secondary);
    margin-bottom: 15px;
    transition: all 0.2s ease;
}
.payment-option:hover {
    border-color: var(--primary-color);
    background-color: var(--background-secondary);
    color: var(--text-primary);
}

.payment-option:last-child {
    margin-bottom: 0;
}

.payment-icon {
    font-size: 32px;
}

.payment-option strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 3px;
}
.payment-option p {
    margin: 0;
    font-size: 14px;
}
.payment-option-content {
    /* This is the magic property. It tells this element to grow
       and take up any available free space in its container. */
    flex-grow: 1;
}

/* --- PayPal Button Container Style --- */
#paypal-button-container {
    margin-top: 15px; /* Keep the vertical spacing */

    /* New Flexbox rules for centering */
    display: flex;
    justify-content: center; /* This is the magic line that centers the content horizontally */
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    padding: 5px;
}
.back-btn:hover {
    color: var(--primary-color);
}

.auth-wrapper {
    width: 100%;
    max-width: 450px;
    margin: 40px auto;
}

.auth-container {
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px 40px;
    box-shadow: 0 10px 25px var(--card-hover-shadow);
}

.auth-container .page-header {
    text-align: center;
    margin-bottom: 30px;
}
.auth-container .page-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}
.auth-container .page-header p {
    color: var(--text-secondary);
}

.social-btn {
    width: 100%;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--background-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}
.social-btn:hover {
    border-color: var(--primary-color);
}
.social-btn img {
    width: 20px;
    height: 20px;
}

.separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    margin: 25px 0;
}
.separator::before, .separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.separator span {
    padding: 0 10px;
    font-size: 14px;
    font-weight: 600;
}

.password-group {
    position: relative;
}

.form-group {
    margin-bottom: 16px;
}

#login-form .btn-full {
    margin-top: 8px;
}

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(25%); /* Adjust for label height */
    cursor: pointer;
    user-select: none; /* Prevents text selection */
    color: var(--text-secondary);
}

.otp-resend-hint {
    margin: 10px 0 6px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

#otp-form .otp-reset-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    padding: 4px 8px;
}

#otp-form .otp-reset-btn:hover {
    text-decoration: underline;
}

.auth-footer-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}
.auth-footer-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}
.auth-footer-link a:hover {
    text-decoration: underline;
}

/* Style for the link below the box */
.container > p > a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}
.container > p > a:hover {
    text-decoration: underline;
}

/* --- NEW: Universal Form Input Styling --- */

/* 1. Target all common text-based input fields */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select { /* Also include select dropdowns for consistency */
    width: 100%; /* Make inputs fill the width of their container */
    padding: 12px 15px; /* Add comfortable internal spacing */
    margin-top: 5px; /* Add some space above the input */
    
    font-family: 'Poppins', sans-serif; /* Use the site's font */
    font-size: 16px;
    
    background-color: var(--background-primary); /* Use theme-aware background */
    color: var(--text-primary); /* Use theme-aware text color */
    
    border: 1px solid var(--border-color); /* Use theme-aware border */
    border-radius: var(--border-radius); /* Match your site's corner rounding */
    
    box-sizing: border-box; /* Ensures padding doesn't break the layout */
    transition: all 0.2s ease-in-out; /* Smooth transition for focus effect */
}

/* 2. Style the "focus" state (when a user clicks into the box) */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none; /* Remove the default browser outline */
    border-color: var(--primary-color); /* Change border color to the accent color */
    
    /* Add a subtle "glow" effect */
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

/* 3. Ensure labels are styled consistently */
.form-group label {
    font-weight: 600;
    color: var(--text-primary);
}

/* --- NEW: Styles for Course Price Display --- */
.course-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 15px 0;
}
.course-price.free {
    color: #14B8A6; /* A nice teal color for "Free" */
}

/* On the individual course page */
#course-price-display {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
}

/* --- NEW: Currency Dropdown Styles --- */
.currency-selector-wrapper {
    /* NEW: Position it absolutely within the page-header */
    position: absolute;
    top: 0;
    right: 0;
    
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    padding: 5px 15px;
    border-radius: 20px;
}
.currency-selector-wrapper label {
    font-weight: 600;
    color: var(--text-secondary);
}
#currency-select {
    border: none;
    background-color: transparent;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    padding: 5px;
    margin: 0;
    cursor: pointer;
}
#currency-select:focus {
    outline: none;
    box-shadow: none;
}

/* --- NEW: Chat Room Styles --- */

.chat-container {
    max-width: 800px;
    margin: 20px auto;
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    height: 70vh; /* 70% of the viewport height */
    box-shadow: 0 4px 15px var(--card-hover-shadow);
}



.message {
    display: flex;
    align-items: flex-start; /* Aligns PFP with the top of the message bubble */
    gap: px;
    max-width: 85%;
    margin-bottom: 15px; /* Moved from the inner .message div */
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.5;
    white-space: pre-wrap; /* This is the new line */
    word-break: break-word; /* Prevents long words from overflowing */
}

.message-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.message-meta .author {
    font-weight: bold;
    color: var(--text-primary);
}

/* Styles for messages from other users */
.message.theirs {
    align-self: flex-start;
}
.message.theirs .message-bubble {
    background-color: var(--background-secondary);
}

/* Styles for messages from the current user */
.message.mine {
    align-self: flex-end; /* Pushes the whole message block to the right */
}
.message.mine .message-meta {
    text-align: right;
}
.message.mine .message-bubble {
    background-color: var(--primary-color);
    color: white;
}

.chat-input-form {
    display: flex;
    padding: 10px;
    border-top: 1px solid var(--border-color);
    gap: 10px;
    flex-shrink: 0; /* Prevent the input form from shrinking */
}

.chat-input-form input {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    background-color: var(--background-secondary);
    padding: 10px;
    border-radius: var(--border-radius);
    font-size: 16px;
    color: var(--text-primary);
    margin: 0;
}
.chat-input-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
    outline: none;
}

.chat-input-form button {
    border: none;
    font-weight: bold;
    padding: 0 20px;
    cursor: pointer;
    white-space: nowrap; /* Prevents text wrapping */
}

/* --- NEW: Profile Settings Styles --- */
.account-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}
.profile-settings-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.pfp-container {
    flex-shrink: 0;
}
.pfp-container img {
    width: 128px;
    height: 128px;
    border-radius: 50%; /* Make it a circle */
    border: 3px solid var(--border-color);
    background-color: var(--background-secondary);
}
.profile-form {
    flex-grow: 1;
}
.save-status {
    margin-top: 10px;
    font-weight: bold;
}
.save-status.success {
    color: #14B8A6; /* Teal */
}
.save-status.error {
    color: #F43F5E; /* Rose */
}

.session-status-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.session-status-panel > div {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--background-secondary);
    padding: 14px;
    text-align: left;
}

.session-status-label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.session-status-panel strong {
    display: block;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 6px;
}

.session-status-panel p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .profile-settings-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .session-status-panel {
        grid-template-columns: 1fr;
    }
}

/* --- NEW: Profile Picture Upload Styles --- */
.pfp-container { text-align: center; }
#pfp-upload-input { display: none; }
#pfp-upload-btn { margin-top: 10px; width: 100%; }
.progress-bar { width: 100%; background-color: var(--border-color); border-radius: 5px; overflow: hidden; height: 10px; margin-top: 10px; }
.progress-bar .progress { height: 100%; width: 0%; background-color: var(--primary-color); transition: width 0.3s ease; }

/* --- NEW: Chat Profile Integration Styles --- */
.message { align-items: flex-start; }
.chat-pfp { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; }
.message-content { display: flex; flex-direction: column; }
.author-link { text-decoration: none; }

/* --- NEW: Public Profile Page Styles --- */
#profile-container { max-width: 700px; }
.profile-header { text-align: center; padding: 30px; background-color: var(--background-secondary); border-radius: var(--border-radius); }
.profile-header img { width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--background-primary); box-shadow: 0 4px 10px var(--card-hover-shadow); }
.profile-header h1 { margin: 15px 0 5px 0; }
.profile-header.private p { font-weight: bold; color: var(--text-secondary); }

/* --- NEW: Chat Hub Styles --- */
.chatroom-list { display: grid; gap: 20px; }
.chatroom-link { display: block; background-color: var(--background-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 25px; text-decoration: none; transition: all 0.2s ease; }
.chatroom-link:hover { transform: translateY(-3px); box-shadow: 0 4px 10px var(--card-hover-shadow); border-color: var(--primary-color); }
.chatroom-link h3 { margin: 0; color: var(--text-primary); }
.chatroom-link p { margin: 5px 0 0 0; color: var(--text-secondary); font-size: 14px; }

/* --- NEW: Chat Profile Integration Styles --- */

/* Make the message a flex container for the PFP and the content */
.message {
    display: flex;
    align-items: flex-start;
    /* UPDATED: Increased the gap to match the larger PFP */
    gap: 12px; 
}

/* Style for the profile picture */
.chat-pfp {
    /* UPDATED: Increased the PFP size */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--background-secondary);
    flex-shrink: 0; /* Prevents the PFP from shrinking */
}

/* Make the author's name in the metadata a clean link */
.author-link {
    text-decoration: none;
    color: var(--text-primary);
}
.author-link:hover {
    text-decoration: underline;
}

/* Base style for all role badges */
.role-badge {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 5px;
    margin-left: 5px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* Specific colors for each role */
.role-administrator {
    background-color: var(--primary-color);
    color: white;
}
.role-contributor {
    background-color: #3B82F6; /* A nice blue */
    color: white;
}
.role-member {
    background-color: var(--background-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* --- NEW: Profile Page & Account Page Styles --- */

/* Styles for the new "View My Profile" button layout */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-header h2 {
    margin: 0;
}

/* Styles for the role badge on the public profile page */
.profile-header .role-badge {
    margin-top: 5px;
}

/* Styles for the course list on the public profile page */
.profile-courses-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.profile-courses-section h3 {
    color: var(--text-primary);
}
.profile-courses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.profile-course-item {
    background-color: var(--background-primary);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* --- NEW: Emoji Picker Styles --- */

/* Make the chat container a positioning context for the picker */
.chat-container {
    position: relative; 
}

/* Style for the new emoji button */
.emoji-btn {
    border: none;
    background: none;
    font-size: 24px;
    padding: 0 10px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}
.emoji-btn:hover {
    background-color: var(--background-secondary);
}

/* Style for the picker itself */
emoji-picker {
    position: absolute;
    bottom: 70px; /* Position it just above the input form */
    left: 10px;  /* Position from the left */
    z-index: 100;
    transition: opacity 0.2s ease;
}

/* Our existing .hidden class will hide it */
emoji-picker.hidden {
    display: none;
}

/* --- NEW: Chat Settings Styles --- */

/* The settings icon button in the header */
.icon-btn {
    position: absolute; /* The key change: pulls the button out of the normal flow */
    top: 10px;          /* Position it 10px from the top of the container */
    left: 10px;         /* Position it 10px from the left of the container */
    z-index: 105;       /* Ensure it's on top of other elements */
    
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.icon-btn:hover {
    background-color: var(--background-secondary);
    color: var(--text-primary);
}

/* The settings panel itself */
.chat-settings-panel {
    position: absolute;
    top: 50px; /* Give it some space from the top edge */
    left: 10px; /* Position from the left */
    width: 300px;
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    z-index: 110;
    box-shadow: 0 5px 15px var(--card-hover-shadow);
}
.chat-settings-panel h3 {
    margin-top: 0;
    text-align: center;
}

/* A single setting option (e.g., Font Size) */
.setting-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}
.setting-option:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.setting-option label {
    font-weight: 600;
}

/* Button group for font size */
.btn-group {
    display: flex;
    background-color: var(--background-secondary);
    border-radius: 8px;
    padding: 3px;
}
.setting-btn {
    border: none;
    background: none;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
}
.setting-btn.active {
    background-color: var(--background-primary);
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Toggle Switch for Enter-to-Send */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--background-secondary); border: 1px solid var(--border-color); transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
input:checked + .slider { background-color: var(--primary-color); border-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(20px); }


/* --- NEW: Font Size Control Styles --- */
[data-font-size="small"] .message-bubble { font-size: 13px; }
[data-font-size="medium"] .message-bubble { font-size: 15px; } /* Default */
[data-font-size="large"] .message-bubble { font-size: 18px; }

/* --- NEW: Textarea Styling for Chat Input --- */
.chat-input-form textarea {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    background-color: var(--background-secondary);
    padding: 10px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    margin: 0;
    resize: none; /* Prevent the user from manually resizing */
    max-height: 100px; /* Limit how tall it can grow */
}
.chat-input-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
    outline: none;
}

/* --- NEW: Message Grouping Styles --- */

/* Add a bit more space between full message groups */
.message:not(.continuation) {
    margin-top: 15px;
}

/* Style for a continuation message */
.message.continuation {
    margin-top: 2px; /* Make them very close together */
    margin-bottom: 2px;
}

/* For a continuation message, we don't need the PFP, so we hide it */
.message.continuation .pfp-link {
    display: none;
}

/* Indent the continuation message bubble to align with the one above it */
.message.continuation .message-bubble {
    margin-left: 50px; /* Same as the PFP width + gap */
}

/* For your own messages, we don't need to indent */
.message.mine.continuation .message-bubble {
    margin-left: 0;
}

/* --- NEW: Final, Robust Message Grouping & Timestamp Styles --- */

/* --- Base Message Layout --- */
.message {
    position: relative;
    display: flex;
    gap: 12px;
    /* By default, single messages and the start of a group have a larger top margin */
    margin-top: 15px; 
}
.message.theirs { align-self: flex-start; }
.message.mine { align-self: flex-end; }

/* --- Continuation Messages (middle and last in a group) --- */
/* THIS IS THE FIX FOR THE GAPS: We drastically reduce the top margin */
.message.middle, .message.last {
    margin-top: -10px;
}
/* THIS IS THE CRITICAL FIX: Use display:none to completely remove the elements */
.message.middle .pfp-link,
.message.middle .message-meta,
.message.last .pfp-link,
.message.last .message-meta {
    display: none;
}

/* HIDE the PFP and meta info for continuation messages */
.message.middle .pfp-wrapper,
.message.middle .message-meta,
.message.last .pfp-wrapper,
.message.last .message-meta {
    display: none; /* This is the fix that was missing */
}

/* --- Merged Bubble Effect --- */
.message-bubble { border-radius: 18px; }
/* Left-side (theirs) bubbles */
.message.theirs.first .message-bubble { border-bottom-left-radius: 5px; }
.message.theirs.middle .message-bubble { border-radius: 5px 18px 18px 5px; }
.message.theirs.last .message-bubble { border-top-left-radius: 5px; }

/* Right-side (mine) bubbles */
.message.mine.first .message-bubble { border-bottom-right-radius: 5px; }
.message.mine.middle .message-bubble { border-radius: 18px 5px 5px 18px; }
.message.mine.last .message-bubble { border-top-right-radius: 5px; }

/* --- Timestamp Logic --- */
.message-content {
    position: relative;
}
.compact-timestamp {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--text-secondary);
    background-color: var(--background-secondary);
    padding: 2px 6px;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--card-hover-shadow);
    white-space: nowrap;
}
.message.theirs .compact-timestamp { left: 100%; margin-left: 10px; }
.message.mine .compact-timestamp { right: 100%; margin-right: 10px; }
.message.first, .message.middle, .message.last { cursor: pointer; }
.message.show-timestamp .compact-timestamp { display: block; }

.message.middle .message-content,
.message.last .message-content {
    margin-left: 52px;
}

/* --- NEW: Chat Bubble & Emoji Polish --- */

/* 1. Darken the sender's message bubble */
.message.mine .message-bubble {
    /* A slightly darker, more saturated version of the primary color */
    background-color: color-mix(in srgb, var(--primary-color) 85%, black);
    color: white;
}

/* 2. Increase the font size for text and emojis */
.message-bubble {
    font-size: 16px; /* Increased from 15px */
    white-space: pre-wrap;
    word-break: break-word;
}

/* 3. Add a subtle outline to emojis to make them pop */
.message-bubble span.emoji {
    text-shadow: 0 0 1px rgba(0,0,0,0.2);
}

/* New style for the public ID on profile pages */
.public-id {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* --- NEW: Header Dropdown Styles --- */

.dropdown {
    position: relative; /* Establishes a positioning context for the menu */
}

/* Add a small arrow to indicate it's a dropdown */
.dropdown-toggle::after {
    content: ' ▼';
    font-size: 10px;
    display: inline-block;
    margin-left: 5px;
}

.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 10px 0;
    min-width: 150px;
    box-shadow: 0 5px 15px var(--card-hover-shadow);
    z-index: 1000;
}

/* Show the dropdown on hover */
.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
}
.dropdown-menu a:hover {
    background-color: var(--background-secondary);
    color: var(--primary-color);
}

/* --- NEW: Members Page Styles --- */

.search-container {
    max-width: 600px;
    margin: 0 auto 40px auto;
}
#search-bar {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border-radius: 25px; /* Pill shape */
}

.member-list {
    display: grid;
    gap: 15px;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--background-secondary);
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.2s ease;
}
.member-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--card-hover-shadow);
}

.member-pfp {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius); /* Square PFP */
    object-fit: cover;
}

.member-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Pushes the role badge to the end */
}

.member-nickname {
    font-weight: 600;
    color: var(--text-primary);
}

.member-public-id {
    font-size: 14px;
    color: var(--text-secondary);
}

/* --- NEW: Profile Privacy Note Style --- */
.setting-note {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.member-count { text-align: center; font-weight: 600; color: var(--text-secondary); margin-bottom: 20px; }

/* Bio on public profile */
.user-bio { font-style: italic; color: var(--text-secondary); margin-top: 10px; }
/* Textarea on account page */
textarea { /* You can add this to your universal input styles */
    width: 100%; padding: 10px; font-family: inherit; /* etc. */
}

/* --- NEW: Use Cairo for User-Generated Content --- */

/* Target the message bubbles in chat */
.message-bubble {
    font-family: 'Cairo', sans-serif;
}

/* Target the user bio on the profile page */
.user-bio {
    font-family: 'Cairo', sans-serif;
}

/* Target the bio input on the account page */
#bio-input {
    font-family: 'Cairo', sans-serif;
}

/* --- NEW: Final, Corrected Halo for Both Circle & Square PFPs --- */

/* --- 1. Base Wrapper and Halo Styles --- */

.pfp-wrapper {
    cursor: pointer;
    position: relative;
    display: inline-block; /* This is key */
    flex-shrink: 0;
    border-radius: 50%;
}

/* This is the base halo style. It's an invisible shadow by default. */
.pfp-wrapper::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0); /* Invisible by default */
    transition: box-shadow 0.3s ease-in-out;
    pointer-events: none;
}

/* When the wrapper has the 'online' class, make the halo visible. */
.pfp-wrapper.online::before {
    box-shadow: 0 0 0 3px #22C55E; /* Solid green */
}

.pfp-wrapper.offline::before {
    box-shadow: 0 0 0 3px #64748B;
}


/* --- 2. Styles for CIRCULAR Profile Pictures (Chat & Profile Page) --- */

/* Make the wrapper and the image circular */

#profile-pfp,
#profile-pfp-wrapper { /* Target the wrapper on the profile page */
    border-radius: 50%;
}

#profile-pfp-wrapper::before { border-radius: 50%; }


/* --- 3. Styles for SQUARE Profile Pictures (Members Page) --- */

/* Make the image square with rounded corners */
.member-pfp {
    border-radius: var(--border-radius); /* Use your site's standard rounding */
}

.member-pfp-wrapper {
    border-radius: var(--border-radius);
}

/* Make the halo for the members page a rounded square to match */
/* We use the new class we added in js/app/members.js */
.member-pfp-wrapper::before {
    border-radius: var(--border-radius);
    inset: -3px;
}

/* --- NEW: Profile Page Status Styles --- */

.profile-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-weight: 600;
    color: var(--text-secondary);
}
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #6B7280; /* Gray for offline */
    transition: background-color 0.3s ease;
}
.status-dot.online {
    background-color: #22C55E; /* Green for online */
}

/* Make the chat PFP circular */
.chat-pfp,
.chat-pfp-wrapper {
    border-radius: 50%;
}

.chat-pfp {
    border-radius: 50%;
    display: block; /* Fixes potential alignment issues */
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 0;
}

/* Apply a simple, uniform border halo to BOTH chat and members page PFPs */
.chat-pfp-wrapper::before {
    inset: -3px;
    border-radius: inherit;
}

.message .chat-pfp-wrapper::before {
    inset: -2px;
}

.chat-pfp-wrapper {
    display: inline-flex;
    position: relative;
    flex: 0 0 auto;
}



/* --- NEW: Enhanced Registration Form Styles --- */
.input-note {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.auth-container a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}
.auth-container a:hover {
    text-decoration: underline;
}

.admin-app-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--background-secondary);
    padding: 14px;
}

/* --- NEW: Profile Page Action & Stat Styles --- */
.profile-action-container {
    margin-top: 20px;
    min-height: 40px; /* Prevent layout shift */
}
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.stat-item {
    text-align: center;
}
.stat-item span:first-child {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}
.stat-item span:last-child {
    font-size: 14px;
    color: var(--text-secondary);
}
.btn.btn-danger {
    background-color: #DC2626; /* A strong red */
    border-color: #DC2626;
    color: white;
}

/* --- NEW: Friends Page & Tab Styles --- */

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}
.tab-link {
    padding: 15px 25px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px; /* Aligns with the container's border */
}
.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}
.tab-content.active {
    display: grid;
    gap: 15px;
}

/* Re-style member card for this context */
.member-card .member-profile-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    flex-grow: 1;
}

.member-actions {
    flex-shrink: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- NEW: Custom Alert Modal Styles --- */
.alert-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Must be on top of everything */
}

.alert-modal-overlay.hidden {
    display: none;
}

.alert-modal {
    background: var(--background-primary);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
}
.alert-modal h3 {
    margin-top: 0;
    color: var(--text-primary);
}
.alert-modal p {
    color: var(--text-secondary);
    margin: 15px 0 25px 0;
}

/* --- NEW: Button UI Feedback & Cursor Fix --- */

/* 1. Add the pointer cursor to all relevant buttons */
.btn, .action-btn, .show-link-btn {
    cursor: pointer;
}

/* 2. Style for a button when it's in the "Processing..." state */
button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- NEW: Button Group Alignment Fix --- */
.action-btn-group-wrapper {
    display: flex;
    justify-content: center;
}

/* --- NEW: In-Chat User Menu & Mute Styles --- */
#chat-user-menu {
    position: fixed; 
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 5px 15px var(--card-hover-shadow);
    z-index: 2000;
}
.menu-option {
    display: block;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.menu-option:hover {
    background-color: var(--background-secondary);
}
.menu-option.hidden {
    display: none;
}

/* Styles for a muted message */
.message.is-muted {
    padding: 5px 0;
    margin-top: 2px;
    margin-bottom: 2px;
    margin-left: 60px; /* Indent to align with normal messages */
}
.message.mine.is-muted {
    margin-left: 0; /* No indent for your own muted messages */
}
.muted-text {
    font-size: 13px;
    font-style: italic;
    color: var(--text-secondary);
}
.muted-text a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}

/* --- NEW: Make non-links feel clickable for User Menu --- */

/* Add the pointer cursor to the PFP wrapper */
.pfp-link {
    cursor: pointer;
}

/* Make the author's name look and feel like a link */
.author-link {
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: bold; /* Make the name stand out */
}
.author-link:hover {
    text-decoration: underline;
}

/* --- NEW: Muted User Styles --- */
.muted-pfp {
    width: 40px;
    height: 40px;
    flex-shrink: 0; /* <-- THIS IS THE FIX */
    border-radius: 50%;
    background-color: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 1px dashed var(--border-color);
}
.message.is-muted {
    align-items: center;
        /* THIS IS THE FIX: Align it to the left by default */
    align-self: flex-start; 
    /* We add the standard margin-left to indent it correctly */
    margin-left: 50px; /* 40px (PFP) + 10px (gap) */
}

    
















/* ===================================================================== */
/* === FINAL, DEFINITIVE CHAT LAYOUT & COMPONENT STYLES === */
/* ===================================================================== */


/* --- Left Sidebar Styles --- */
.group-sidebar {
    background-color: var(--background-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 15px;
    transition: all 0.3s ease-in-out;
}

/* --- 5. Sidebar & Toggle Button Styles --- */
.group-sidebar, .member-sidebar {
        position: relative;
    background-color: var(--background-secondary);
    display: flex;
    flex-direction: column;
    padding: 15px;
    transition: transform 0.3s ease-in-out;
}
.group-sidebar { border-right: 1px solid var(--border-color); }
.member-sidebar { border-left: 1px solid var(--border-color); }



.toggle-sidebar-btn, .toggle-members-btn {
    position: absolute;
    top: 45px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px var(--card-hover-shadow);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease-in-out;
}

.toggle-sidebar-btn { left: 250px; transform: translateX(-50%); }
.toggle-members-btn { right: 250px; transform: translateX(50%); }

.toggle-sidebar-btn:hover {
    border-color: var(--primary-color);
    transform: translateX(-50%) scale(1.1); /* Keep the translate while scaling */
}
.toggle-members-btn:hover {
    border-color: var(--primary-color);
    transform: scale(1.1); /* Keep the translate while scaling */
}
/* Only show the button on hover */
.group-sidebar:hover .toggle-sidebar-btn {
    opacity: 1;
}


.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.sidebar-header h3 { margin: 0; }
.sidebar-header .icon-btn { position: static; }
.group-list {
    overflow-y: auto;
}
.group-link {
    display: block;
    padding: 12px 10px;
    border-radius: var(--border-radius);
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 5px;
}
.group-link:hover { background-color: color-mix(in srgb, var(--border-color) 50%, transparent); }
.group-link.active { background-color: var(--primary-color); color: white; }

/* --- Right Sidebar Styles (for the future Member List) --- */
.member-sidebar {
    background-color: var(--background-secondary);
    border-left: 1px solid var(--border-color);
    padding: 15px;
}
.member-sidebar.hidden {
    display: none;
}
.member-list {
    overflow-y: auto;
}

/* --- NEW: Final, Corrected Protruding Footer Button --- */

.hide-footer-btn {
    /* Positioning */
    position: fixed;   /* CRITICAL: This makes it float over the page */
    bottom: 90px;      /* Position it 20px from the bottom of the screen */
    right: 75px;       /* Position it 20px from the right of the screen */
    z-index: 1000;     /* Ensure it's on top of most content */
    
    /* Appearance */
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    
    /* Center the icon inside */
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
/* Add a hover effect */
.hide-footer-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 -3px 12px rgba(0,0,0,0.2);
}

/* When the footer is hidden, we can add a subtle change to the button */
#chat-page-footer.hidden + .hide-footer-btn {
    /* For example, move it down slightly to sit on the bottom edge */
    bottom: 85px;
    right: 35px;
}

/* --- NEW: Right Sidebar --- */
.member-sidebar {
    background-color: var(--background-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 15px;
    transition: transform 0.3s ease-in-out;
}

/* 2. Complete the Member List Styling */
.member-list-container {
    overflow-y: auto; /* Add a scrollbar if the list is long */
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between members */
}

.member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-secondary);
}
.member-item:hover { background-color: color-mix(in srgb, var(--border-color) 50%, transparent); }
.member-item span {
    font-weight: 600;
}

/* 3. The Definitive Halo Fix for the Member List */
.member-pfp-small { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* We create a NEW, DEDICATED halo style for this specific size */
.member-item .pfp-wrapper::before {
    inset: -3px;
    border-radius: inherit;
}

.member-item .member-info { display: flex; flex-direction: column; min-width: 0; margin-left: 2px; align-items: flex-start; text-align: left; }
.member-item .member-name { color: var(--text-primary); font-weight: 700; line-height: 1.2; }
.member-item .role-badge { font-size: 10px; align-self: flex-start; margin-top: 2px; }


/* --- Halo Fix for Member List --- */
.member-item .pfp-wrapper::after {
    width: 10px; height: 10px;
    bottom: -1px; right: -1px;
    border-width: 1.5px;
}

.alert-modal .modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

/* ===================================================================== */
/* === FINAL, DEFINITIVE CHAT LAYOUT (CSS GRID ARCHITECTURE) === */
/* ===================================================================== */
/* 1. The Parent Container for the Chat View */

/* --- 1. Master Page Grid --- */
.chat-page-body {
    display: flex;
    flex-direction: column; /* Stack its children (header, main, footer) vertically */
    height: 100vh; /* The entire page is exactly the screen height */
    overflow: hidden; /* No browser-level scrolling */
}



/* Tell the header and footer not to grow or shrink */
header, #chat-page-footer { flex-shrink: 0; }

.main-chat-layout {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  transition: grid-template-columns 0.3s ease-in-out;
  width: 100%;
  height: 100%;
  
}

/* --- 3. Center Chat Panel (A Flex Column) --- */
.chat-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
      min-height: 0;
    position: relative; /* Anchor for welcome/chat stacking */
}

.page-main,
.main-chat-layout {
  min-height: 0; /* prevent overflow */
}

/* --- NEW: Polished Chat Welcome Screen Styles --- */

.chat-welcome-screen {
    /* The Core Fix: Tell flexbox how to behave */
    display: flex;
    flex-direction: column; /* THIS IS THE FIX: Stacks children vertically */
    justify-content: center;
    align-items: center;
    text-align: center;      /* Centers the text within the h2 and p tags */
    
    /* Polish and Spacing */
    padding: 5px;
    color: var(--text-secondary); /* Use a softer color for the subtext */
}

/* Style the main title */
.chat-welcome-screen h2 {
    color: var(--primary-color);
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 0px;
}

/* Style the subtitle */
.chat-welcome-screen p {
    max-width: 500px; /* Keeps the text from getting too wide on large screens */
    font-size: 16px;
    line-height: 1.6;
}

/* 4. The View Switcher (Welcome vs. Chat) */
.chat-welcome-screen, .chat-content {
    width: 100%;
    height: 100%;
}
.chat-welcome-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
}
.hidden {
    display: none;
}

#chat-content {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.chat-content.hidden { display: none; }

/* --- 5. The Core Chat View Components --- */
.chat-header, .chat-input-form {
    flex-shrink: 0; /* These have a fixed, natural height */
}

#chat-messages {
    /* THIS WILL NOW WORK: The grid gives it a definitive space to live in. */
    overflow-y: auto;
    
    min-height: 0; /* The critical overflow prevention hack */
    padding: 20px;
    display: flex;
      flex: 1; /* ensure it grows properly */
    flex-direction: column;
}

.chat-header {
    padding: 18px 55px;
    border-bottom: 1px solid var(--border-color);
        flex-shrink: 0; /* Prevent the header from shrinking */
}

.chat-header h2 { margin: 0; font-size: 20px; }
/* 6. The Header and Footer of the Chat (Fixed Height) */
.chat-header, .chat-input-form {
    flex-shrink: 0; /* These have a fixed height */
}

/* --- Corrected Footer Layout & Stacking --- */
#chat-page-footer {
    position: relative; /* CRITICAL: This is now the positioning anchor for the button */
    z-index: 101;       /* CRITICAL: This ensures the footer is layered ON TOP of the chat content */
    flex-shrink: 0;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1); /* Add a subtle shadow to show it's on top */
}
/* This part of your existing code is correct */
#chat-page-footer.hidden {
    transform: translateY(100%);
}




/*
/* --- 3. Sidebar Base Styles --- */
.group-sidebar, .member-sidebar {
    background-color: var(--background-secondary);
    display: flex;
    flex-direction: column;
    padding: 15px;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    position: relative; /* Anchor for buttons */
}
.group-sidebar { border-right: 1px solid var(--border-color); }
.member-sidebar { border-left: 1px solid var(--border-color); }

/* --- 3. Toggle Button Base Styles (Now as Grid Items) --- */
.toggle-sidebar-btn, .toggle-members-btn {
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    z-index: 10;
    transition: transform 0.3s ease-in-out;
}
.toggle-sidebar-btn { border-left: none; border-radius: 0 8px 8px 0; }
.toggle-members-btn { border-right: none; border-radius: 8px 0 0 8px; }

/* Hide Left Sidebar (Group List) */
.main-chat-layout.sidebar-hidden {
  grid-template-columns: 0 1fr 250px;
}
/* Left Sidebar Hidden */
.main-chat-layout.sidebar-hidden .group-sidebar {
  transform: translateX(-100%);
  opacity: 0;
}
.main-chat-layout.sidebar-hidden .toggle-sidebar-btn {
  left: 0;
  transform: translateX(0);
  transition: all 0.3s ease-in-out;
}

/* Hide Right Sidebar (Member List) */
.main-chat-layout.members-hidden {
  grid-template-columns: 250px 1fr 0;
}

/* Right Sidebar Hidden */
.main-chat-layout.members-hidden .member-sidebar {
  transform: translateX(100%);
  opacity: 0;
    grid-template-columns: 250px 1fr 0;
}
.main-chat-layout.members-hidden .toggle-members-btn {
  right: 0;
  transform: translateX(0);
  transition: all 0.3s ease-in-out;
}

/* Hide Both */
.main-chat-layout.sidebar-hidden.members-hidden {
  grid-template-columns: 0 1fr 0;
}

/* --- 7. Center Chat Panel (Internal Layout) --- */
.chat-main { display: flex; flex-direction: column; min-width: 0; position: relative; }
.chat-content { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.chat-header, .chat-input-form { flex-shrink: 0; }
.chat-messages {
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.toggle-sidebar-btn {
  position: absolute;
  top: 45px;
  left: 250px;
  transform: translateX(-50%);
  transition: all 0.3s ease-in-out;
}

.toggle-members-btn {
  position: absolute;
  top: 45px;
  right: 250px;
  transform: translateX(50%);
  transition: all 0.3s ease-in-out;
}

/* --- NEW: Scroll to Bottom Button --- */
.scroll-to-bottom-btn {
    position: absolute;
    bottom: 80px; /* Position it just above the input form */
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;

    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--card-hover-shadow);
    color: var(--text-primary);
    
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    
    opacity: 0;
    transform: translateX(-50%) translateY(10px); /* Start slightly down */
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; /* Prevents interaction when hidden */
}

/* This is the state when it's visible */
.scroll-to-bottom-btn:not(.hidden) {
    opacity: 1;
    transform: translateX(-50%) translateY(0); /* Move to final position */
    pointer-events: auto;
}

.scroll-to-bottom-btn:hover {
    background-color: var(--border-color);
    border-color: var(--primary-color);
}

/* --- NEW: Group Settings Styles --- */
.danger-zone {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ef4444; /* Red */
    background-color: rgba(239, 68, 68, 0.05);
    padding: 15px;
    border-radius: var(--border-radius);
}
.danger-zone h4 {
    color: #ef4444;
    margin-top: 0;
}
.danger-zone p {
    font-size: 14px;
}
.btn-danger {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
}
.btn-danger:hover {
    background-color: #f87171;
    border-color: #f87171;
}

/* --- NEW: Ban/Kick Styles --- */
.kick-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.5;
    transition: all 0.2s ease;
}
.kick-btn:hover {
    opacity: 1;
    color: #ef4444; /* Red */
    transform: scale(1.2);
}

.banned-users-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
}

.banned-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.banned-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =================================== */
/* === MAIN SITE MEDUGO LOGO ANIMATION === */
/* =================================== */

#medugo-nav-link {
    font-size: 18px; /* Slightly smaller for the main nav bar */
    font-weight: 700;
    position: relative;
    color: #ffffff;
    filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    margin-left: 4px;
}

[data-theme="light"] #medugo-nav-link {
    background: #1F2937;
    border: 1px solid #334155;
}

#medugo-nav-link::after {
    display: none !important;
}

#medugo-nav-link .logo-go {
    /* 1. Create the animated gradient background */
    background: linear-gradient(90deg, #00F2FE, #42E3B4, #E15478, #00F2FE);
    background-size: 300% 100%;


    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    
    /* The animation now runs over the repeating part of the gradient */
    animation: move-gradient 4s linear infinite;
}

@keyframes move-gradient {
    0% {
        background-position: 0% 50%;
    }
    100% {
        /* Move the background by a distance equal to one full pattern cycle */
        background-position: -150% 50%; 
    }
}

.gender-selector { display: flex; gap: 20px; margin-top: 10px; }
.gender-selector label { display: flex; align-items: center; gap: 5px; font-weight: normal; }

/* Hamburger button */
.hamburger{
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 30%, var(--border-color));
  background: color-mix(in srgb, var(--background-secondary) 88%, var(--primary-color) 12%);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;

  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary-color) 20%, transparent);
  transition: background-color .2s ease, border-color .2s ease, transform .16s ease;
}

.hamburger span{
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .18s ease, opacity .18s ease, width .18s ease;
}

.hamburger:hover{
  transform: translateY(-1px);
  border-color: var(--primary-color);
}

.hamburger:hover span{
  width: 20px;
}

/* Animated X when open */
.hamburger.is-open span:nth-child(1){
  transform: translateY(8px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2){
  opacity: 0;
}
.hamburger.is-open span:nth-child(3){
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile nav behavior */
@media (max-width: 900px){
  .hamburger{ display: inline-flex; }

  header .container > .logo { order: 1; }
  header .container > a.btn.btn-secondary { order: 2; margin-left: auto; }
  header .container > .hamburger { order: 3; margin-left: 8px; }
  header .container > .nav-links { order: 4; width: 100%; }

  /* Hide the desktop nav by default */
  .nav-links{
    display: none;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    justify-content: space-between;
    align-items: center;

    margin-top: 12px;
    padding: 12px;

    border: 1px solid var(--border-color);
    background: var(--background-secondary);
    border-radius: 14px;
  }

  .nav-links.has-open-dropdown{
    flex-wrap: wrap !important;
    overflow-x: hidden;
    overflow-y: visible;
  }

  /* When open */
  .nav-links.is-open{
    display: flex;
  }

  .nav-links li,
  .nav-links > a{
    flex: 1 1 0;
    white-space: nowrap;
    text-align: center;
  }

  .nav-links > a#medugo-nav-link{
    flex: 0 0 86px;
    width: 86px;
    min-width: 86px;
    max-width: 86px;
    justify-content: center;
    padding-inline: 10px;
    margin-left: 0;
  }

  .nav-links li > a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    line-height: 1;
    white-space: nowrap;
  }

  .nav-links .dropdown{
    position: static;
  }

  .nav-links .dropdown-menu{
    position: static;
    display: none;
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--background-primary) 82%, var(--background-secondary) 18%);
  }

  .nav-links .dropdown.open{
    flex: 1 1 100%;
    width: 100%;
  }

  .nav-links .dropdown.open .dropdown-menu{
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
  }

  .nav-links .dropdown.open .dropdown-menu a{
    padding: 8px 10px;
    border-radius: 8px;
    text-align: center;
    background: transparent;
    flex: 1 1 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Make nav container stack nicely */
  header nav.container{
    flex-wrap: wrap;
    row-gap: 10px;
  }
}

@media (max-width: 640px){
  .nav-links{
    flex-wrap: nowrap !important;
    align-items: center !important;
  }

  .nav-links.is-open{
    flex-wrap: nowrap !important;
  }

  /* Icon-first compact nav */
  .nav-links li > a,
  .nav-links > a#medugo-nav-link{
    font-size: 0 !important;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links li > a::before{
    font-family: "Material Icons";
    font-size: 23px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    -webkit-font-feature-settings: "liga";
    font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
  }

  .nav-links li:nth-child(1) > a::before{ content: "home"; }
  .nav-links li:nth-child(2) > a::before{ content: "school"; }
  .nav-links li:nth-child(3) > a::before{ content: "description"; }
  .nav-links li:nth-child(4) > a::before{ content: "build"; }
  .nav-links li:nth-child(5) > a::before{ content: "groups"; }

  /* Reveal text label on interaction (hover/focus/press) */
  .nav-links li > a:hover,
  .nav-links li > a:focus-visible,
  .nav-links li > a:active,
  .nav-links > a#medugo-nav-link:hover,
  .nav-links > a#medugo-nav-link:focus-visible,
  .nav-links > a#medugo-nav-link:active{
    font-size: 14px !important;
    gap: 6px;
    padding-inline: 8px;
  }

  .nav-links li > a:hover::before,
  .nav-links li > a:focus-visible::before,
  .nav-links li > a:active::before,
  .nav-links > a#medugo-nav-link:hover::before,
  .nav-links > a#medugo-nav-link:focus-visible::before,
  .nav-links > a#medugo-nav-link:active::before{
    display: none;
  }

  #medugo-nav-link{
    color: #ffffff !important;
    font-size: 14px !important;
    margin-left: 0 !important;
    justify-content: center !important;
    flex: 0 0 86px !important;
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    padding-inline: 10px !important;
    justify-self: center !important;
    gap: 0 !important;
  }

  #medugo-nav-link .logo-go{
    display: inline !important;
    font-size: inherit !important;
    line-height: 1 !important;
  }

  /* Community submenu must be a second horizontal row, never a column */
  .nav-links .dropdown.open{
    flex-basis: 100%;
  }

  .nav-links .dropdown.open .dropdown-menu{
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
  }

  .nav-links .dropdown.open .dropdown-menu a{
    flex: 1 1 0;
    white-space: nowrap;
    text-align: center;
    padding: 8px 10px;
  }
}

header nav > a.btn.btn-secondary.has-pfp{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-auth-pfp{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--background-primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-primary) 28%, transparent);
}

/* Dropdown open state for mobile */
.dropdown.open .dropdown-menu{
  display: block;
}

/* Force burger-menu community expansion to a second row strip (not boxed dropdown) */
@media (max-width: 900px){
  .nav-links{
    position: relative;
    overflow: visible !important;
  }

  .nav-links .dropdown{
    flex: 1 1 0;
  }

  .nav-links .dropdown:hover,
  .nav-links .dropdown.open{
    flex: 1 1 100% !important;
    width: 100%;
  }

  .nav-links .dropdown .dropdown-menu{
    position: absolute !important;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    width: 100% !important;
    margin-top: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    z-index: 150;
  }

  .nav-links .dropdown:hover .dropdown-menu,
  .nav-links .dropdown.open .dropdown-menu{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .nav-links .dropdown:hover .dropdown-menu a,
  .nav-links .dropdown.open .dropdown-menu a{
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    text-align: center;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: color-mix(in srgb, var(--background-primary) 86%, var(--background-secondary) 14%);
  }

  .nav-links.has-open-dropdown .dropdown.open{
    flex: 1 1 100%;
    width: 100%;
  }

  .nav-links.has-open-dropdown .dropdown.open .dropdown-menu{
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    margin-top: 10px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    gap: 8px !important;
  }

  .nav-links.has-open-dropdown .dropdown.open .dropdown-menu a{
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    text-align: center;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: color-mix(in srgb, var(--background-primary) 86%, var(--background-secondary) 14%);
  }
}

/* Support both old + new class names */
@media (max-width: 900px){
  .nav-links{
    display: none;
  }
  .nav-links.active,
  .nav-links.is-open{
    display: flex;
  }
}

/* Final mobile nav alignment pass: keep MEDUGO readable without stretching the row. */
@media (max-width: 900px){
  header .nav-links.active,
  header .nav-links.is-open{
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center !important;
    justify-items: center !important;
    gap: 10px !important;
  }

  header .nav-links li,
  header .nav-links > a{
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: initial !important;
  }

  header .nav-links li > a{
    width: 100% !important;
    justify-content: center !important;
  }

  header .nav-links > a#medugo-nav-link{
    width: auto !important;
    min-width: 92px !important;
    max-width: none !important;
    height: 36px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    justify-self: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1 !important;
    gap: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  header .nav-links > a#medugo-nav-link::before{
    content: none !important;
    display: none !important;
  }

  header .nav-links > a#medugo-nav-link .logo-go{
    display: inline !important;
    font-size: inherit !important;
    line-height: 1 !important;
  }
}

@media (max-width: 640px){
  header .nav-links.active,
  header .nav-links.is-open{
    grid-template-columns: repeat(5, minmax(38px, 1fr)) max-content;
    gap: 8px !important;
    padding: 10px !important;
  }

  header .nav-links li > a{
    font-size: 0 !important;
    padding-inline: 0 !important;
  }

  header .nav-links > a#medugo-nav-link{
    min-width: 86px !important;
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
  }
}

/* Footer mobile layout */
footer .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* Make footer sections behave nicely */
footer .theme-selector,
footer .color-selector,
footer .footer-links{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Mobile: stack cleanly */
@media (max-width: 700px){
  footer{
    padding: 14px 0; /* smaller vertical padding */
  }

  footer .container{
    display: grid;
    grid-template-columns: 1fr; /* 1 column */
    gap: 10px;                  /* compact spacing */
    align-items: start;
  }

  /* Row 1: copyright */
  footer p{
    margin: 0;
    font-size: 13px;
    opacity: .9;
  }

  /* Row 2: pack theme + color into ONE row */
  footer .theme-selector,
  footer .color-selector{
    display: inline-flex;
    gap: 8px;
    flex-wrap: nowrap;
  }

  /* Put both selectors on the same line */
  footer .theme-selector{
    margin-right: 10px;
  }

  /* Create a wrapper behavior using the container itself */
  footer .theme-selector,
  footer .color-selector{
    justify-content: flex-start;
  }

  /* Make both groups sit on one line by forcing them inline */
  footer .theme-selector,
  footer .color-selector{
    width: auto;
  }

  /* Footer links on their own row */
  footer .footer-links{
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }

  /* ✅ Make buttons compact (override any global button sizing) */
  footer .theme-btn,
  footer .color-btn{
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1;
  }
}

.footer-controls{
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 700px){
  .footer-controls{
    flex-wrap: nowrap; /* keep in one line */
  }
}

footer{
  margin-top: auto;               /* ensures footer goes to bottom */
  padding: 18px 0;
}

footer .container{
  display: flex;
  flex-direction: column;
  align-items: center;            /* center everything */
  justify-content: center;
  gap: 12px;
  text-align: center;
}

footer p{
  margin: 0;
  font-size: 13px;
  opacity: .9;
}

footer .footer-links{
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

footer .theme-selector,
footer .color-selector{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;

  border: 1px solid var(--border-color);
  background: var(--background-secondary);
  border-radius: 999px;           /* pill */
}

footer .theme-btn{
  width: 34px;
  height: 34px;
  border-radius: 999px;           /* circle */
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: grid;
  place-items: center;

  transition: transform .12s ease, background .12s ease;
}

footer .theme-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.06);
}

footer .color-btn{
  width: 28px;
  height: 28px;
  border-radius: 999px;           /* ✅ circle again */
  border: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
}

/* the actual color dot inside */
footer .color-btn::after{
  content: "";
  position: absolute;
  inset: 5px;                     /* dot padding */
  border-radius: 999px;           /* ✅ dot stays circular */
  background: var(--swatch-color);
}

@media (max-width: 700px){
  footer .theme-selector,
  footer .color-selector{
    flex-wrap: nowrap;
  }
}

footer .footer-controls{
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: center;
}
@media (max-width: 700px){
  footer .footer-controls{ flex-wrap: nowrap; }
}

/* Fix: theme emojis shifting on desktop */
footer .theme-btn{
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  line-height: 1 !important;
  text-align: center !important;

  /* prevents tiny font rendering offset */
  font-variant-ligatures: none;
}

/* If your global button styles add extra left padding */
footer .theme-btn::before,
footer .theme-btn::after{
  content: none !important;
}





/* ===== Home Redesign ===== */
.home-page main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-hero {
  padding: 24px 0 6px;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: stretch;
}

.home-hero-copy,
.home-hero-visual {
  background: linear-gradient(145deg, color-mix(in srgb, var(--background-primary) 86%, var(--primary-color) 14%), var(--background-secondary));
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 20px;
}

.home-kicker {
  margin: 0 0 10px;
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.home-hero-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.08;
}

.home-hero-copy p {
  margin: 12px 0 0;
  color: var(--text-secondary);
}

.home-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.home-link-strip {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-link-strip a {
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.pulse-orb {
  width: 110px;
  height: 110px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #fff6, var(--primary-color));
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-color) 35%, transparent);
  animation: pulseOrb 2.2s ease-out infinite;
}

@keyframes pulseOrb {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-color) 35%, transparent); }
  100% { box-shadow: 0 0 0 20px transparent; }
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-stat-card {
  border: 1px solid var(--border-color);
  background: var(--background-primary);
  border-radius: 14px;
  padding: 10px;
}

.home-stat-label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.home-stat-value {
  margin: 6px 0 0;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 800;
  color: var(--text-primary);
}

.home-section {
  padding: 4px 0;
}

.home-section-head {
  margin-bottom: 12px;
}

.home-section-head h2 {
  margin: 0;
}

.home-section-head p {
  margin: 6px 0 0;
  color: var(--text-secondary);
}

.home-scroll-shell,
.home-activity-marquee {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  background: var(--background-secondary);
}

.home-scroll-track,
.home-activity-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 12px;
  animation: homeMarquee 42s linear infinite;
}

.home-activity-track {
  animation-duration: 32s;
}

@keyframes homeMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.home-course-card {
  min-width: 240px;
  max-width: 280px;
  border: 1px solid var(--border-color);
  background: var(--background-primary);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-course-card h3 {
  margin: 0;
  font-size: 16px;
}

.home-course-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.home-course-meta {
  color: var(--text-secondary);
  font-size: 12px;
}

.home-course-top {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.home-pill {
  display: inline-flex;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  background: var(--background-secondary);
}

.home-courses-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-courses-grid .home-course-card {
  min-width: 0;
  max-width: 100%;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-feature-card {
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--background-secondary);
  padding: 14px;
  transition: transform .16s ease, border-color .16s ease;
}

.home-feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.home-feature-card h3 {
  margin: 0;
}

.home-feature-card p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.activity-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--background-primary);
  font-size: 13px;
  white-space: nowrap;
}

.home-mini-empty {
  padding: 14px;
  color: var(--text-secondary);
}

.home-section-foot {
  margin-top: 12px;
}

@media (max-width: 980px) {
  .home-hero-grid,
  .home-feature-grid,
  .home-courses-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .home-hero-grid,
  .home-feature-grid,
  .home-courses-grid,
  .home-stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== To Do Page ===== */
.todo-page-main {
  padding-top: 42px;
}

.todo-header {
  margin-bottom: 26px;
}

.todo-header .home-kicker {
  margin-bottom: 8px;
}

.todo-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.todo-summary-card,
.todo-list-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--background-primary) 88%, var(--primary-color) 12%), var(--background-secondary));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--card-hover-shadow) 80%, transparent);
}

.todo-summary-card {
  padding: 18px;
}

.todo-summary-card h2,
.todo-list-card h2 {
  margin: 8px 0 0;
  color: var(--text-primary);
}

.todo-summary-card p,
.todo-card-head p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.todo-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 34%, var(--border-color));
  color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 10%, var(--background-primary));
  font-size: 12px;
  font-weight: 700;
}

.todo-status-pill.ongoing {
  color: #0f766e;
  border-color: color-mix(in srgb, #14b8a6 42%, var(--border-color));
  background: color-mix(in srgb, #14b8a6 12%, var(--background-primary));
}

[data-theme="dark"] .todo-status-pill.ongoing {
  color: #5eead4;
}

.todo-roadmap {
  display: grid;
  gap: 14px;
}

.todo-list-card {
  padding: 18px;
}

.todo-card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.todo-check {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid var(--primary-color);
  background:
    linear-gradient(var(--background-primary), var(--background-primary)) padding-box,
    linear-gradient(135deg, var(--primary-color), var(--primary-color-hover)) border-box;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary-color) 12%, transparent);
  position: relative;
}

.todo-check::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 7px;
  width: 9px;
  height: 15px;
  border: solid var(--primary-color);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.todo-items {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.todo-items li {
  position: relative;
  padding-left: 28px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.todo-items li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.72em;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 12%, transparent);
}

@media (max-width: 900px) {
  .todo-overview {
    grid-template-columns: 1fr;
  }

  .todo-card-head {
    grid-template-columns: 1fr;
  }
}

/* ===== Landing Page Redesign ===== */
.landing-html {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.landing-page {
  --landing-orange: var(--primary-color);
  --landing-orange-soft: color-mix(in srgb, var(--primary-color) 12%, #fff);
  --landing-ink: #071120;
  --landing-muted: #4b5565;
  --landing-line: #f0ded3;
  --landing-shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
  --landing-panel: #fff;
  --landing-panel-soft: #fff8f4;
  --landing-text-strong: #101828;
  --landing-text: #344054;
  background: #fff;
  color: var(--landing-muted);
  font-family: "Poppins", "Cairo", sans-serif;
  display: block;
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
}

.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page p {
  word-break: normal;
}

.landing-page .container {
  max-width: 1220px;
  padding-left: 28px;
  padding-right: 28px;
}

.landing-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: none;
  padding: 18px 0;
}

.landing-header .landing-nav {
  gap: 28px;
}

.landing-header .landing-logo {
  order: 1;
}

.landing-header .landing-nav-links {
  order: 2;
}

.landing-header .landing-actions {
  order: 3;
}

.landing-header .hamburger {
  order: 4;
}

.landing-logo {
  flex: 0 0 auto;
  color: var(--landing-orange);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0;
}

.landing-logo:visited,
.landing-logo:hover {
  color: var(--landing-orange);
}

.landing-page .landing-logo .logo-img {
  width: 38px;
  height: 38px;
}

.landing-page .landing-nav-links {
  flex: 1;
  justify-content: center;
  gap: 38px;
  margin: 0;
}

.landing-page .landing-nav-links a {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 0;
}

.landing-page .landing-nav-links a::after {
  height: 2px;
  bottom: 2px;
  background: var(--landing-orange);
}

.landing-page .landing-nav-links a.active,
.landing-page .landing-nav-links a:hover {
  color: #111827;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.landing-page .landing-login,
.landing-page .landing-login:visited {
  min-width: 92px;
  border-color: var(--landing-orange);
  color: var(--landing-orange);
  background: #fff;
  border-radius: 13px;
  padding: 12px 20px;
  box-shadow: none;
}

.landing-page .landing-login:hover {
  background: var(--landing-orange-soft);
  color: var(--landing-orange);
}

.landing-medugo-btn,
.landing-medugo-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff5a00, #ff7a1a);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(255, 90, 0, 0.22);
}

.landing-medugo-btn:hover {
  color: #fff;
  transform: translateY(-1px);
}

.landing-medugo-btn .material-icons {
  font-size: 20px;
  color: #fff;
}

.landing-mobile-medugo {
  display: none;
}

.landing-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 28px;
  background:
    linear-gradient(90deg, #fff 0%, #fff 43%, rgba(255, 101, 18, 0.08) 100%),
    radial-gradient(circle at 88% 20%, rgba(255, 90, 0, 0.16), transparent 32%);
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 360px;
  height: 360px;
  background:
    linear-gradient(30deg, transparent 92%, rgba(255, 90, 0, 0.14) 93%),
    linear-gradient(150deg, transparent 92%, rgba(255, 90, 0, 0.14) 93%);
  background-size: 66px 58px;
  opacity: 0.5;
  pointer-events: none;
}

.landing-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
  align-items: center;
  min-height: 410px;
  gap: 28px;
}

.landing-hero-copy h1 {
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(43px, 5vw, 66px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.landing-hero-copy h1 span {
  color: var(--landing-orange);
}

.landing-hero-copy > p {
  max-width: 440px;
  margin: 24px 0 0;
  color: #4b5565;
  font-size: 20px;
  line-height: 1.55;
}

.landing-hero-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 16px;
  margin-top: 26px;
}

.landing-btn,
.landing-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 13px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.landing-btn:hover {
  transform: translateY(-1px);
}

.landing-btn-primary,
.landing-btn-primary:visited {
  background: var(--landing-orange);
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 90, 0, 0.22);
}

.landing-btn-primary:hover {
  color: #fff;
  background: #f24f00;
}

.landing-btn-secondary,
.landing-btn-secondary:visited {
  background: #fff;
  color: var(--landing-orange);
  border-color: rgba(255, 90, 0, 0.45);
}

.landing-btn-secondary:hover {
  color: var(--landing-orange);
  background: var(--landing-orange-soft);
}

.landing-learners {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
}

.landing-avatar-stack {
  display: flex;
  align-items: center;
}

.landing-avatar-stack span {
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 999px;
  margin-left: -8px;
  background: #f1f5f9 center / cover no-repeat;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.landing-avatar-stack span:first-child {
  margin-left: 0;
}

.landing-avatar-stack span:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--landing-orange);
  font-size: 13px;
  font-weight: 800;
}

.landing-learners p {
  margin: 0;
  color: #1f2937;
  font-size: 14px;
}

.landing-learners strong {
  color: var(--landing-orange);
}

.landing-hero-art {
  position: relative;
  min-height: 430px;
}

.landing-hero-image {
  position: absolute;
  right: -8px;
  bottom: -22px;
  width: min(720px, 100%);
  filter: drop-shadow(0 30px 50px rgba(121, 54, 13, 0.16));
}

.landing-floating-ui {
  position: absolute;
  z-index: 2;
  width: min(190px, 28%);
  opacity: 0.88;
  filter: drop-shadow(0 18px 24px rgba(121, 54, 13, 0.13));
  animation: landingBob 4.8s ease-in-out infinite;
}

.landing-floating-ui-one {
  left: 9%;
  top: 10%;
}

.landing-floating-ui-two {
  right: 6%;
  top: 2%;
  animation-delay: -1.7s;
}

@keyframes landingBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

.landing-feature-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 4px;
  margin-bottom: 30px;
  padding-top: 26px;
  padding-bottom: 26px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--landing-shadow);
}

.landing-feature-strip article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 0 24px;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
}

.landing-feature-strip article:last-child {
  border-right: 0;
}

.landing-feature-strip .material-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 15px;
  background: var(--landing-orange-soft);
  color: var(--landing-orange);
  font-size: 29px;
}

.landing-feature-strip h2 {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.landing-feature-strip p {
  margin: 5px 0 0;
  color: #4b5565;
  font-size: 12px;
  line-height: 1.45;
}

.landing-featured {
  padding-top: 22px;
  padding-bottom: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--landing-shadow);
}

.landing-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.landing-section-head h2 {
  position: relative;
  margin: 0;
  padding-left: 22px;
  color: #101828;
  font-size: 26px;
  font-weight: 800;
}

.landing-section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 5px;
  height: 28px;
  border-radius: 999px;
  background: var(--landing-orange);
}

.landing-section-head a,
.landing-section-head a:visited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--landing-orange);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.landing-section-head .material-icons {
  font-size: 19px;
}

.landing-carousel-shell {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  gap: 12px;
  min-height: 222px;
}

.landing-carousel-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.landing-carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: #fff;
  color: var(--landing-orange);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.landing-carousel-btn[hidden] {
  display: none !important;
}

.landing-carousel-shell.is-empty {
  grid-template-columns: 1fr;
}

.landing-carousel-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.landing-course-card {
  min-height: 198px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 13px;
  background: #fff;
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.landing-course-card a,
.landing-course-card a:visited {
  display: grid;
  grid-template-columns: 1fr 150px;
  align-items: center;
  height: 100%;
  min-height: 198px;
  gap: 16px;
  padding: 20px 22px;
  color: inherit;
  text-decoration: none;
}

.landing-course-card.is-active {
  border-color: rgba(255, 90, 0, 0.72);
  transform: scale(1.04);
  box-shadow: 0 18px 36px rgba(255, 90, 0, 0.08);
}

.landing-course-card.is-side {
  opacity: 0.44;
  filter: saturate(0.7);
}

.landing-course-copy {
  min-width: 0;
}

.landing-course-pill,
.landing-course-price {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.landing-course-pill {
  margin-bottom: 10px;
  color: var(--landing-orange);
  background: var(--landing-orange-soft);
}

.landing-course-card h3 {
  margin: 0;
  color: #101828;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.landing-course-byline {
  margin: 6px 0 0;
  color: #667085;
  font-size: 13px;
}

.landing-course-description {
  display: -webkit-box;
  margin: 15px 0 18px;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.landing-course-card img {
  width: 135px;
  height: 135px;
  object-fit: contain;
  justify-self: center;
}

.landing-featured-loading,
.landing-featured-empty {
  grid-column: 1 / -1;
  min-height: 170px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 90, 0, 0.35);
  border-radius: 16px;
  color: #667085;
  background: linear-gradient(135deg, #fff, #fff7f1);
  font-weight: 700;
  line-height: 1.5;
  padding: 24px;
  text-align: center;
}

.landing-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.landing-carousel-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #f3ded2;
  cursor: pointer;
  padding: 0;
}

.landing-carousel-dots button.active {
  background: var(--landing-orange);
}

.landing-medugo {
  position: relative;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 28px;
  align-items: center;
  margin-top: 20px;
  padding-top: 22px;
  padding-bottom: 22px;
  min-height: 360px;
  border-radius: 18px;
  overflow: visible;
  background:
    radial-gradient(circle at 78% 34%, rgba(64, 109, 255, 0.28), transparent 35%),
    linear-gradient(135deg, #071120, #0a1730 58%, #06101f);
  color: #fff;
}

.landing-medugo-copy {
  padding-left: 12px;
}

.landing-medugo-copy > p:first-child {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  color: #fff;
  font-size: 25px;
  font-weight: 800;
}

.landing-medugo-copy > p:first-child .material-icons {
  color: #a7c5ff;
  font-size: 28px;
}

.landing-medugo-copy h2 {
  max-width: 400px;
  margin: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1.26;
  font-weight: 800;
}

.landing-medugo-copy h2 span {
  color: #8ea7ff;
}

.landing-medugo-copy > p:nth-of-type(2) {
  max-width: 420px;
  margin: 16px 0 26px;
  color: #dbe7ff;
  font-size: 16px;
  line-height: 1.7;
}

.landing-btn-glow,
.landing-btn-glow:visited {
  color: #fff;
  background: linear-gradient(135deg, #6b67ff, #e254d7);
  box-shadow: 0 16px 30px rgba(105, 92, 255, 0.28);
}

.landing-btn-glow:hover {
  color: #fff;
}

.landing-medugo-preview {
  width: 100%;
  border-radius: 16px;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.3));
  align-self: end;
  margin-bottom: -34px;
}

.landing-tools {
  padding-top: 20px;
}

.landing-tools-head {
  margin-bottom: 14px;
}

.landing-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.landing-tool-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid rgba(255, 90, 0, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #fff8f4);
  overflow: hidden;
}

.landing-upcoming {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--landing-orange);
  background: var(--landing-orange-soft);
  font-size: 12px;
  font-weight: 800;
}

.landing-tool-card h3 {
  margin: 12px 0 0;
  color: #101828;
  font-size: 20px;
  font-weight: 800;
}

.landing-tool-card small {
  color: #101828;
  font-size: 13px;
  font-weight: 600;
}

.landing-tool-card p {
  max-width: 360px;
  margin: 12px 0 0;
  color: #344054;
  font-size: 14px;
}

.landing-source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.landing-source-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f5f5f5;
  color: #101828;
  font-size: 12px;
  font-weight: 700;
}

.landing-flashcard-tool {
  display: grid;
  grid-template-columns: 1fr 210px;
  align-items: center;
  gap: 14px;
}

.landing-flashcard-tool img {
  width: 210px;
  justify-self: end;
}

.landing-community {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 108px;
  margin-top: 18px;
  padding-top: 16px;
  padding-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff5a00, #ff8a3d);
  color: #fff;
}

.landing-community-icon {
  display: grid;
  place-items: center;
}

.landing-community-icon .material-icons {
  font-size: 62px;
  color: rgba(255, 255, 255, 0.54);
}

.landing-community h2 {
  margin: 0;
  color: #fff;
  font-size: 25px;
  font-weight: 800;
}

.landing-community p {
  margin: 4px 0 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.55;
}

.landing-btn-light,
.landing-btn-light:visited {
  min-width: 180px;
  background: #fff;
  color: var(--landing-orange);
}

.landing-btn-light:hover {
  color: var(--landing-orange);
}

.landing-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  margin-bottom: 34px;
  padding-top: 18px;
  padding-bottom: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--landing-shadow);
}

.landing-stats article {
  display: grid;
  grid-template-columns: 56px auto;
  align-items: center;
  column-gap: 16px;
}

.landing-stats .material-icons {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: var(--landing-orange);
  background: var(--landing-orange-soft);
  font-size: 27px;
}

.landing-stats strong {
  color: var(--landing-orange);
  font-size: 28px;
  line-height: 1;
}

.landing-stats p {
  margin: 4px 0 0;
  color: #344054;
  font-size: 13px;
}

.landing-footer {
  margin-top: 0;
  background:
    linear-gradient(180deg, #fff 0%, #fff7f1 100%);
  border-top: 1px solid rgba(255, 90, 0, 0.12);
  color: #344054;
}

.landing-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 32px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 24px;
}

.landing-footer-brand .logo {
  color: var(--landing-orange);
  font-size: 23px;
  font-weight: 800;
}

.landing-footer-brand p {
  max-width: 360px;
  margin: 12px 0 0;
  color: #667085;
  font-size: 14px;
}

.landing-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
}

.landing-footer-links a,
.landing-footer-links a:visited,
.landing-footer-bottom a,
.landing-footer-bottom a:visited {
  color: #344054;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.landing-footer-links a:hover,
.landing-footer-bottom a:hover {
  color: var(--landing-orange);
}

.landing-footer-controls {
  justify-content: flex-end;
  margin: 0;
}

.landing-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 22px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.landing-footer-bottom p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.landing-footer-bottom div {
  display: flex;
  gap: 18px;
}

@media (max-width: 1040px) {
  .landing-page .landing-nav-links {
    gap: 24px;
  }

  .landing-hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .landing-hero-art {
    display: grid;
    place-items: center;
    min-height: 330px;
  }

  .landing-hero-image {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: min(560px, 86vw);
  }

  .landing-floating-ui-one {
    left: 17%;
    top: 7%;
  }

  .landing-floating-ui-two {
    right: 17%;
    top: 6%;
  }

  .landing-feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-feature-strip article {
    border-right: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px 24px;
  }

  .landing-feature-strip article:last-child,
  .landing-feature-strip article:nth-last-child(2) {
    border-bottom: 0;
  }

  .landing-feature-strip article:last-child {
    grid-column: 1 / -1;
    width: 50%;
    justify-self: center;
  }

  .landing-carousel-track {
    grid-template-columns: 1fr 1fr;
  }

  .landing-course-card.is-side:last-child {
    display: none;
  }

  .landing-medugo,
  .landing-tool-grid,
  .landing-community,
  .landing-footer-grid {
    grid-template-columns: 1fr;
  }

  .landing-medugo-preview {
    max-width: 720px;
    margin: 0 auto;
  }

  .landing-community {
    text-align: center;
  }

  .landing-community .landing-btn-light {
    justify-self: center;
  }

  .landing-footer-links,
  .landing-footer-controls {
    justify-content: center;
  }

  .landing-footer-grid,
  .landing-footer-brand {
    text-align: center;
  }

  .landing-footer-brand .logo,
  .landing-footer-brand p {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 721px) and (max-width: 1040px) {
  .landing-hero {
    padding-top: 54px;
    padding-bottom: 40px;
    background:
      linear-gradient(90deg, #fff 0%, #fff 46%, rgba(255, 101, 18, 0.08) 100%),
      radial-gradient(circle at 86% 28%, rgba(255, 90, 0, 0.14), transparent 34%);
  }

  .landing-hero-grid {
    grid-template-columns: minmax(310px, 0.9fr) minmax(330px, 1fr);
    gap: 16px;
    min-height: 500px;
  }

  .landing-hero-copy h1 {
    font-size: clamp(44px, 6vw, 54px);
  }

  .landing-hero-copy > p {
    font-size: 18px;
  }

  .landing-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .landing-hero-actions .landing-btn {
    width: 100%;
    white-space: nowrap;
    font-size: 14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .landing-todo-btn {
    grid-column: 1 / -1;
  }

  .landing-hero-art {
    min-height: 420px;
  }

  .landing-hero-image {
    width: min(520px, 58vw);
  }

  .landing-floating-ui {
    width: min(150px, 25%);
  }

  .landing-floating-ui-one {
    left: 6%;
    top: 15%;
  }

  .landing-floating-ui-two {
    right: 6%;
    top: 10%;
  }
}

@media (max-width: 900px) {
  .landing-header .landing-nav {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
  }

  .landing-header .landing-logo {
    order: 1;
  }

  .landing-header .landing-actions {
    order: 2;
    margin-left: auto;
  }

  .landing-header .hamburger {
    order: 3;
    margin-left: 0;
  }

  .landing-page .landing-nav-links {
    display: none;
    order: 4;
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr)) max-content;
    gap: 10px;
    padding: 12px;
  }

  .landing-page .landing-nav-links.is-open,
  .landing-page .landing-nav-links.active {
    display: grid;
  }

  .landing-page .landing-nav-links li {
    width: 100%;
  }

  .landing-page .landing-nav-links li > a {
    min-height: 44px;
    padding: 0 8px;
    justify-content: center;
    font-size: 13px;
  }

  .landing-page .landing-mobile-medugo {
    display: block;
  }

  .landing-medugo-btn {
    display: none;
  }
}

@media (max-width: 720px) {
  .landing-page .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .landing-header {
    padding: 12px 0;
  }

  .landing-page .landing-logo .logo-img {
    width: 34px;
    height: 34px;
  }

  .landing-logo {
    font-size: 22px;
  }

  .landing-page .landing-login {
    min-width: 0;
    padding: 10px 14px;
  }

  .landing-hero {
    padding-top: 42px;
  }

  .landing-hero-copy h1 {
    font-size: 39px;
    line-height: 1.12;
  }

  .landing-hero-copy > p {
    font-size: 17px;
  }

  .landing-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .landing-btn {
    width: 100%;
  }

  .landing-hero-art {
    min-height: 245px;
  }

  .landing-floating-ui {
    width: 30%;
  }

  .landing-floating-ui-one {
    left: 18%;
    top: 9%;
  }

  .landing-floating-ui-two {
    right: 17%;
    top: 6%;
  }

  .landing-feature-strip {
    grid-template-columns: 1fr;
  }

  .landing-feature-strip article {
    grid-template-columns: 58px 1fr;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .landing-feature-strip article:nth-last-child(2) {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .landing-feature-strip article:last-child {
    grid-column: auto;
    width: auto;
    max-width: none;
  }

  .landing-section-head {
    align-items: flex-start;
  }

  .landing-section-head h2 {
    font-size: 25px;
  }

  .landing-section-head a {
    max-width: 92px;
    text-align: right;
    line-height: 1.25;
    justify-content: flex-end;
  }

  .landing-carousel-shell {
    grid-template-columns: 1fr;
  }

  .landing-carousel-btn {
    display: none;
  }

  .landing-carousel-track {
    grid-template-columns: 1fr;
  }

  .landing-course-card.is-side {
    display: none;
  }

  .landing-course-card.is-active {
    transform: none;
  }

  .landing-course-card a {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .landing-course-card img {
    width: 120px;
    height: 120px;
    justify-self: start;
  }

  .landing-medugo {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .landing-medugo-copy {
    padding-left: 0;
  }

  .landing-medugo-copy h2 {
    font-size: 28px;
  }

  .landing-flashcard-tool {
    grid-template-columns: 1fr;
  }

  .landing-flashcard-tool img {
    justify-self: center;
  }

  .landing-stats {
    grid-template-columns: 1fr 1fr;
  }

  .landing-footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .landing-header .landing-nav {
    gap: 8px;
  }

  .landing-page .landing-login {
    font-size: 14px;
  }

  .landing-page .hamburger {
    width: 42px;
    height: 42px;
  }

  .landing-page .landing-nav-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-page .landing-nav-links li > a {
    font-size: 12px;
  }

  .landing-actions {
    gap: 8px;
  }

  .landing-hero {
    background:
      linear-gradient(90deg, #fff 0%, #fff 58%, rgba(255, 101, 18, 0.07) 100%);
  }

  .landing-hero-copy h1 {
    font-size: clamp(34px, 10vw, 39px);
  }

  .landing-hero-copy > p {
    font-size: 16px;
  }

  .landing-hero-image {
    width: min(340px, 88vw);
  }

  .landing-stats {
    grid-template-columns: 1fr;
  }
}

/* ===== Landing Page Refinements ===== */
[data-theme="dark"] .landing-page {
  --landing-orange-soft: color-mix(in srgb, var(--primary-color) 18%, #0f172a);
  --landing-ink: #f8fafc;
  --landing-muted: #cbd5e1;
  --landing-line: rgba(148, 163, 184, 0.24);
  --landing-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  --landing-panel: #101827;
  --landing-panel-soft: #151f2f;
  --landing-text-strong: #f8fafc;
  --landing-text: #d4dce8;
  background: #0b1120;
}

.landing-page .landing-header,
.landing-page .landing-login,
.landing-page .landing-btn-secondary,
.landing-page .landing-feature-strip,
.landing-page .landing-featured,
.landing-page .landing-carousel-btn,
.landing-page .landing-course-card,
.landing-page .landing-stats {
  background: var(--landing-panel);
}

.landing-page .landing-login,
.landing-page .landing-btn-secondary {
  border-color: color-mix(in srgb, var(--landing-orange) 45%, transparent);
}

.landing-hero-nowrap {
  white-space: nowrap;
}

.landing-hero-plain {
  color: var(--landing-ink) !important;
  -webkit-text-fill-color: currentColor;
}

[data-theme="dark"] .landing-logo span {
  color: #fff;
}

[data-theme="dark"] .landing-page .landing-login,
[data-theme="dark"] .landing-page .landing-login:visited {
  background: #101827;
  color: #fff;
  border-color: color-mix(in srgb, var(--landing-orange) 62%, #ffffff 12%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .landing-page .landing-header {
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.landing-page .landing-nav-links a,
.landing-page .landing-nav-links a.active,
.landing-page .landing-nav-links a:hover,
.landing-feature-strip h2,
.landing-section-head h2,
.landing-course-card h3,
.landing-tool-card h3,
.landing-tool-card small,
.landing-learners p {
  color: var(--landing-text-strong);
}

.landing-hero-copy > p,
.landing-feature-strip p,
.landing-course-byline,
.landing-footer-brand p,
.landing-footer-bottom p {
  color: var(--landing-muted);
}

.landing-course-description,
.landing-tool-card p,
.landing-stats p,
.landing-footer-links a,
.landing-footer-links a:visited,
.landing-footer-bottom a,
.landing-footer-bottom a:visited {
  color: var(--landing-text);
}

.landing-page .landing-login.has-pfp,
.landing-page .landing-actions .landing-login.has-pfp,
.landing-header .landing-login.has-pfp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 134px;
  line-height: 1;
  white-space: nowrap;
}

.landing-page .landing-login.has-pfp .header-auth-pfp {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: 0;
}

.medugo-wordmark,
.medugo-wordmark:visited {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.medugo-wordmark .logo-go,
.medugo-wordmark-pill .logo-go,
.landing-page #medugo-nav-link .logo-go,
.landing-medugo .logo-go,
.landing-footer .logo-go {
  background: linear-gradient(90deg, #00F2FE, #42E3B4, #E15478, #8b5cf6, #00F2FE);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: move-gradient 4s linear infinite;
}

.landing-page #medugo-nav-link,
.landing-page #medugo-nav-link:visited,
.landing-medugo-btn,
.landing-medugo-btn:visited {
  min-height: 44px;
  padding: 5px 16px;
  border-radius: 999px;
  background: #1f2937;
  border: 1px solid #334155;
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  line-height: 1;
}

.landing-medugo-copy > p:first-child,
.landing-medugo-copy > p:first-child .medugo-wordmark {
  gap: 0;
  color: #fff;
}

.landing-btn-glow,
.landing-btn-glow:visited {
  color: #fff;
  background: #1f2937;
  border: 1px solid #334155;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.landing-btn-glow:hover {
  color: #fff;
  background: #273449;
}

.landing-medugo-preview,
.landing-flashcard-tool img {
  animation: landingBob 5.6s ease-in-out infinite;
}

.landing-flashcard-tool img {
  animation-duration: 5.2s;
}

.landing-hero {
  background:
    linear-gradient(90deg, var(--landing-panel) 0%, var(--landing-panel) 43%, color-mix(in srgb, var(--landing-orange) 8%, transparent) 100%),
    radial-gradient(circle at 88% 20%, color-mix(in srgb, var(--landing-orange) 16%, transparent), transparent 32%);
}

.landing-floating-ui {
  width: min(280px, 38%);
  opacity: 0.94;
}

.landing-floating-ui-one {
  left: 1%;
  top: 4%;
}

.landing-floating-ui-two {
  right: -1%;
  top: 2%;
}

.landing-hero-image {
  width: min(780px, 104%);
}

.landing-featured-loading,
.landing-featured-empty,
.landing-tool-card {
  background: linear-gradient(135deg, var(--landing-panel), var(--landing-panel-soft));
  color: var(--landing-muted);
}

.landing-source-chips span {
  gap: 7px;
  background: color-mix(in srgb, var(--landing-panel) 78%, #e5e7eb);
  color: var(--landing-text-strong);
}

.landing-source-chips i {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.source-amboss i { background: #14b8a6; }
.source-uworld i { background: #3b82f6; }
.source-mrcp i { background: #ef4444; }
.source-usmle i { background: #111827; }
.source-smle i { background: #64748b; }
.source-more i { background: var(--landing-orange); }

.landing-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-stats article:nth-child(2),
.landing-stats article:nth-child(3) {
  display: grid;
}

.landing-footer {
  background: linear-gradient(180deg, var(--landing-panel) 0%, var(--landing-panel-soft) 100%);
}

@keyframes medugoRiseBob {
  0%, 100% { transform: translateY(18px); }
  50% { transform: translateY(-8px); }
}

.landing-medugo-preview {
  animation: medugoRiseBob 5.8s ease-in-out infinite;
  margin-bottom: -58px;
}

.landing-footer {
  border-top: 1px solid color-mix(in srgb, var(--landing-orange) 18%, transparent);
}

.landing-footer-grid {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 22px;
}

.landing-footer-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.landing-footer-brand p {
  max-width: 520px;
}

.landing-footer-links {
  max-width: 620px;
  gap: 10px;
}

.landing-footer-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
}

.landing-footer-links a:hover {
  background: color-mix(in srgb, var(--landing-orange) 10%, transparent);
}

.landing-footer-controls {
  justify-content: center;
}

.landing-carousel-shell {
  overflow: hidden;
}

.landing-carousel-track.is-slider {
  display: flex;
  grid-template-columns: none;
  align-items: stretch;
  gap: 28px;
  min-height: 260px;
  transition: transform 0.62s cubic-bezier(.22, .8, .24, 1);
  will-change: transform;
}

.landing-carousel-track.no-transition {
  transition: none !important;
}

.landing-carousel-track.is-slider .landing-course-card {
  flex: 0 0 clamp(280px, 38vw, 430px);
}

.landing-carousel-track.is-slider .landing-course-card.is-side {
  opacity: 0.42;
  transform: scale(0.9);
}

.landing-carousel-track.is-slider .landing-course-card.is-active {
  opacity: 1;
  transform: scale(1);
}

.landing-course-card a,
.landing-course-card a:visited {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 150px);
}

.landing-course-card h3,
.landing-course-description,
.landing-course-byline {
  overflow-wrap: normal;
  word-break: normal;
}

.landing-course-card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.landing-course-media {
  display: grid;
  place-items: center;
  width: 150px;
  height: 126px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--landing-orange) 7%, var(--landing-panel));
  overflow: hidden;
}

.landing-course-media img,
.landing-course-card img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  padding: 8px;
}

.landing-course-card.is-side .landing-course-media {
  opacity: 0.9;
}

.landing-reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(.22, .8, .24, 1);
}

.landing-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .landing-reveal,
  .landing-reveal.is-visible,
  .landing-medugo-preview,
  .landing-flashcard-tool img,
  .landing-floating-ui {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

.landing-hero-actions .landing-btn {
  white-space: nowrap;
  min-width: 156px;
}

@media (max-width: 1040px) {
  .landing-hero-actions,
  .landing-hero-copy .landing-hero-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .landing-hero-actions .landing-btn {
    width: 100%;
    min-height: 46px;
    padding: 0 10px;
    white-space: nowrap;
    font-size: clamp(12px, 1.8vw, 14px);
  }

  .landing-todo-btn {
    grid-column: auto;
  }
}

@media (max-width: 1180px) {
  .landing-feature-strip,
  .landing-page .landing-feature-strip {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    overflow: visible;
  }

  .landing-feature-strip article {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 10px;
    min-width: 0;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    padding: 12px 10px;
  }

  .landing-feature-strip article:first-child {
    border-left: 0;
  }

  .landing-feature-strip article:last-child {
    grid-column: auto;
    width: auto;
  }

  .landing-feature-strip h2 {
    font-size: clamp(10px, 1.5vw, 13px);
    line-height: 1.25;
  }

  .landing-feature-strip p {
    font-size: 10px;
    line-height: 1.35;
  }
}

@media (max-width: 720px) {
  .landing-hero-actions,
  .landing-hero-copy .landing-hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .landing-hero-actions .landing-btn {
    min-width: 0;
    min-height: 42px;
    padding: 0 6px;
    font-size: clamp(10px, 2.8vw, 12px);
    white-space: nowrap;
  }

  .landing-carousel-track.is-slider {
    gap: 16px;
  }

  .landing-carousel-track.is-slider .landing-course-card {
    flex-basis: min(322px, 84vw);
  }

  .landing-course-card a,
  .landing-course-card a:visited {
    grid-template-columns: minmax(0, 1fr) 94px;
    gap: 12px;
    padding: 16px;
  }

  .landing-course-media {
    width: 94px;
    height: 94px;
  }

  .landing-course-card h3 {
    font-size: 17px;
  }
}

.landing-community {
  background: linear-gradient(135deg, var(--landing-orange), color-mix(in srgb, var(--landing-orange) 72%, #ffffff 28%));
}

.landing-btn-primary:hover {
  background: color-mix(in srgb, var(--landing-orange) 86%, #000 14%);
}

.landing-course-card.is-active {
  border-color: color-mix(in srgb, var(--landing-orange) 72%, transparent);
  box-shadow: 0 18px 36px color-mix(in srgb, var(--landing-orange) 10%, transparent);
}

.landing-mobile-medugo .medugo-wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #1f2937;
  border: 1px solid #334155;
  color: #fff;
}

[data-theme="dark"] .landing-page .landing-nav-links,
[data-theme="dark"] .landing-feature-strip,
[data-theme="dark"] .landing-featured,
[data-theme="dark"] .landing-tool-card,
[data-theme="dark"] .landing-stats,
[data-theme="dark"] .landing-footer-bottom {
  border-color: rgba(148, 163, 184, 0.18);
}

@media (max-width: 1180px) {
.landing-feature-strip {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .landing-feature-strip article {
    flex: 0 0 210px;
    scroll-snap-align: start;
    border-right: 0;
    border-bottom: 0;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px 24px;
  }

  .landing-feature-strip article:last-child {
    grid-column: auto;
    width: auto;
    justify-self: center;
    border-bottom: 0;
  }

  .landing-feature-strip article:nth-last-child(2) {
    border-bottom: 0;
  }
}

@media (min-width: 721px) and (max-width: 1040px) {
  .landing-medugo.container {
    max-width: none;
    width: 100%;
    border-radius: 0;
    padding-left: 34px;
    padding-right: 34px;
    overflow: visible;
  }

  .landing-floating-ui {
    width: min(220px, 34%);
  }

  .landing-floating-ui-one {
    left: 2%;
    top: 10%;
  }

  .landing-floating-ui-two {
    right: 2%;
    top: 6%;
  }
}

@media (max-width: 720px) {
  .landing-feature-strip,
  .landing-page .landing-feature-strip {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    padding: 14px 12px;
  }

  .landing-feature-strip article {
    flex-basis: auto;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px 5px;
  }

  .landing-feature-strip .material-icons {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 21px;
  }

  .landing-feature-strip h2 {
    font-size: 9px;
    line-height: 1.15;
  }

  .landing-feature-strip p {
    display: none;
  }

  .landing-floating-ui {
    width: min(170px, 44%);
  }

  .landing-floating-ui-one {
    left: 10%;
    top: 5%;
  }

  .landing-floating-ui-two {
    right: 8%;
    top: 5%;
  }

  .landing-feature-strip article:last-child {
    grid-column: auto;
    width: auto;
  }
}

@media (max-width: 900px) {
  .landing-page #medugo-nav-link.landing-medugo-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 640px) {
  .landing-page #medugo-nav-link.landing-medugo-btn {
    display: none !important;
  }
}

/* Final landing theme + asset polish */
.landing-page {
  --landing-art-filter: none;
}

[data-accent-color="blue"] .landing-page {
  --landing-art-filter: hue-rotate(188deg) saturate(1.12);
}

[data-accent-color="teal"] .landing-page {
  --landing-art-filter: hue-rotate(145deg) saturate(1.08);
}

[data-accent-color="rose"] .landing-page {
  --landing-art-filter: hue-rotate(322deg) saturate(1.18);
}

.landing-controller-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.18em;
  height: 1.18em;
  background: currentColor;
  vertical-align: -0.16em;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='6' x2='10' y1='11' y2='11'/%3E%3Cline x1='8' x2='8' y1='9' y2='13'/%3E%3Cline x1='15' x2='15.01' y1='12' y2='12'/%3E%3Cline x1='18' x2='18.01' y1='10' y2='10'/%3E%3Cpath d='M17.32 5H6.68a4 4 0 0 0-3.97 3.59c-.36 3.58-.58 5.98-.58 5.98a3 3 0 0 0 5.18 2.4L9.5 15h5l2.19 2.97a3 3 0 0 0 5.18-2.4s-.22-2.4-.58-5.98A4 4 0 0 0 17.32 5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='6' x2='10' y1='11' y2='11'/%3E%3Cline x1='8' x2='8' y1='9' y2='13'/%3E%3Cline x1='15' x2='15.01' y1='12' y2='12'/%3E%3Cline x1='18' x2='18.01' y1='10' y2='10'/%3E%3Cpath d='M17.32 5H6.68a4 4 0 0 0-3.97 3.59c-.36 3.58-.58 5.98-.58 5.98a3 3 0 0 0 5.18 2.4L9.5 15h5l2.19 2.97a3 3 0 0 0 5.18-2.4s-.22-2.4-.58-5.98A4 4 0 0 0 17.32 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.landing-medugo-btn .landing-controller-icon,
.landing-medugo-copy > p:first-child .landing-controller-icon {
  color: #a8c7ff;
}

.landing-btn-glow .landing-controller-icon {
  color: #fff;
}

.landing-hero {
  background:
    linear-gradient(90deg, var(--landing-panel) 0%, var(--landing-panel) 42%, color-mix(in srgb, var(--landing-orange) 8%, transparent) 100%),
    radial-gradient(circle at 82% 28%, color-mix(in srgb, var(--landing-orange) 16%, transparent), transparent 34%);
}

.landing-hero::after {
  background:
    linear-gradient(30deg, transparent 92%, color-mix(in srgb, var(--landing-orange) 16%, transparent) 93%),
    linear-gradient(150deg, transparent 92%, color-mix(in srgb, var(--landing-orange) 16%, transparent) 93%);
  background-size: 66px 58px;
}

.landing-hero-image {
  filter: var(--landing-art-filter) drop-shadow(0 30px 50px rgba(121, 54, 13, 0.16));
}

.landing-floating-ui {
  filter: var(--landing-art-filter) drop-shadow(0 18px 24px rgba(121, 54, 13, 0.13));
}

.landing-hero-art {
  min-height: 430px;
}

.landing-hero-image {
  right: 6%;
  bottom: 18px;
  width: min(690px, 88%);
}

.landing-floating-ui-one {
  left: 18%;
  top: 15%;
  width: min(220px, 30%);
}

.landing-floating-ui-two {
  right: 8%;
  top: 6%;
  width: min(220px, 30%);
}

.landing-medugo.container,
.landing-medugo {
  max-width: none;
  width: 100%;
  border-radius: 0;
  margin-left: 0;
  margin-right: 0;
  padding-left: max(28px, calc((100vw - 1220px) / 2 + 28px));
  padding-right: max(28px, calc((100vw - 1220px) / 2 + 28px));
  overflow: visible;
  isolation: isolate;
}

.landing-medugo::before,
.landing-medugo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.landing-medugo::before {
  background:
    radial-gradient(circle at 70% 18%, rgba(76, 111, 255, 0.24), transparent 28%),
    linear-gradient(115deg, transparent 0 46%, rgba(255, 255, 255, 0.05) 47% 49%, transparent 50%),
    linear-gradient(25deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: auto, 180px 180px, 42px 42px;
  animation: medugoBgDrift 14s linear infinite;
  opacity: 0.9;
}

.landing-medugo::after {
  background:
    radial-gradient(circle at 88% 72%, rgba(20, 184, 166, 0.18), transparent 24%),
    radial-gradient(circle at 52% 30%, rgba(124, 58, 237, 0.18), transparent 28%);
  animation: medugoPulse 6s ease-in-out infinite;
}

.landing-medugo-copy,
.landing-medugo-preview {
  position: relative;
  z-index: 1;
}

@keyframes medugoBgDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 0, 180px 180px, 42px 42px; }
}

@keyframes medugoPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.landing-btn-glow {
  gap: 10px;
  min-height: 48px;
  border-radius: 12px;
  background: #1f2937;
  border-color: rgba(148, 163, 184, 0.32);
}

.landing-medugo-copy > p:first-child {
  gap: 16px;
}

.landing-footer {
  background:
    radial-gradient(circle at 50% -40%, color-mix(in srgb, var(--landing-orange) 16%, transparent), transparent 48%),
    linear-gradient(180deg, var(--landing-panel) 0%, var(--landing-panel-soft) 100%);
}

@media (min-width: 721px) and (max-width: 1040px) {
  .landing-hero-image {
    width: min(430px, 52vw);
    right: 4%;
    bottom: 72px;
  }

  .landing-floating-ui-one {
    left: 5%;
    top: 22%;
    width: min(160px, 23%);
  }

  .landing-floating-ui-two {
    right: 5%;
    top: 12%;
    width: min(160px, 23%);
  }
}

@media (max-width: 720px) {
  .landing-hero {
    background:
      linear-gradient(90deg, var(--landing-panel) 0%, var(--landing-panel) 52%, color-mix(in srgb, var(--landing-orange) 7%, transparent) 100%);
  }

  .landing-hero-art {
    min-height: 238px;
  }

  .landing-hero-image {
    width: min(255px, 72vw);
    right: auto;
    left: 10%;
    bottom: 12px;
  }

  .landing-floating-ui-one {
    left: 46%;
    top: 10%;
    width: min(118px, 31vw);
  }

  .landing-floating-ui-two {
    right: 5%;
    top: 3%;
    width: min(118px, 31vw);
  }

  .landing-medugo.container,
  .landing-medugo {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 520px) {
  .landing-page .landing-login.has-pfp {
    min-width: 0;
    padding: 8px 10px;
  }

  .landing-page .landing-login.has-pfp span {
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Final responsive header/CTA pass */
@media (max-width: 640px) {
  .landing-header .landing-nav {
    gap: 8px;
  }

  .landing-page #medugo-nav-link.landing-medugo-btn {
    display: inline-flex !important;
    min-height: 40px;
    padding: 5px 10px;
    font-size: 10px;
    gap: 5px;
  }

  .landing-page #medugo-nav-link .landing-controller-icon {
    width: 1.05em;
    height: 1.05em;
  }

  .landing-page .landing-login {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .landing-header .hamburger {
    width: 40px;
    height: 40px;
  }

  .landing-section-head {
    align-items: center;
  }

  .landing-section-head a {
    max-width: none;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1;
  }

  .landing-medugo .landing-btn-glow {
    width: fit-content;
    max-width: 100%;
    padding: 0 18px;
    margin-top: 4px;
  }
}

/* Landing page final structural fixes, 20260602v */
.landing-html,
.landing-page {
  overflow-x: clip;
}

.landing-page main {
  overflow-x: clip;
}

.landing-header {
  position: relative;
  z-index: 20;
}

.landing-page .landing-nav-links a {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .landing-header .landing-nav {
    gap: 14px;
  }

  .landing-page .landing-nav-links {
    display: none;
    order: 5;
    flex: 0 0 100%;
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0;
    background: var(--landing-panel);
  }

  .landing-page .landing-nav-links.is-open,
  .landing-page .landing-nav-links.active {
    display: grid;
  }

  .landing-page .landing-nav-links li,
  .landing-page .landing-nav-links li > a {
    min-width: 0;
    width: 100%;
  }

  .landing-page .landing-nav-links li > a {
    min-height: 44px;
    justify-content: center;
    padding: 0 8px;
    font-size: 13px;
  }

  .landing-header .hamburger {
    display: flex;
    order: 4;
    margin-left: 0;
  }

  .landing-header .landing-actions {
    margin-left: auto;
  }
}

.landing-page #medugo-nav-link,
.landing-page #medugo-nav-link:visited,
.landing-medugo-btn,
.landing-medugo-btn:visited {
  border-radius: 12px;
  background: color-mix(in srgb, var(--landing-panel) 82%, #ffffff 6%);
  border-color: color-mix(in srgb, var(--landing-orange) 28%, #64748b 38%);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--landing-orange) 10%, transparent);
}

.landing-controller-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  background: none;
  color: currentColor;
  font-family: "Material Icons";
  font-size: 1.22em;
  font-weight: normal;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  -webkit-mask: none;
  mask: none;
}

.landing-controller-icon::before {
  content: "sports_esports";
}

.landing-medugo-btn .landing-controller-icon,
.landing-medugo-copy > p:first-child .landing-controller-icon {
  color: #b9d4ff;
}

.landing-hero {
  overflow: hidden;
  padding-top: clamp(46px, 6vw, 72px);
  background:
    linear-gradient(90deg, var(--landing-panel) 0%, var(--landing-panel) 42%, color-mix(in srgb, var(--landing-orange) 8%, transparent) 100%),
    radial-gradient(circle at 78% 30%, color-mix(in srgb, var(--landing-orange) 12%, transparent), transparent 34%);
}

.landing-hero::after {
  inset: 0 0 auto auto;
  width: min(48vw, 520px);
  height: min(44vw, 480px);
  background:
    linear-gradient(30deg, transparent 92%, color-mix(in srgb, var(--landing-orange) 15%, transparent) 93%),
    linear-gradient(150deg, transparent 92%, color-mix(in srgb, var(--landing-orange) 15%, transparent) 93%);
  background-size: 70px 62px;
}

.landing-hero-grid {
  grid-template-columns: minmax(540px, 0.84fr) minmax(600px, 1.16fr);
  gap: clamp(24px, 3vw, 36px);
  min-height: 470px;
}

.landing-hero-actions,
.landing-hero-copy .landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.landing-hero-actions .landing-btn {
  min-width: 150px;
  width: auto;
  padding: 0 18px;
  white-space: nowrap;
  font-size: 14px;
}

.landing-hero-actions .landing-btn-primary,
.landing-hero-actions .landing-btn-primary:visited {
  box-shadow: 0 14px 28px color-mix(in srgb, var(--landing-orange) 18%, transparent);
}

.landing-hero-actions .landing-btn-primary:hover {
  box-shadow: 0 16px 32px color-mix(in srgb, var(--landing-orange) 24%, transparent);
}

.landing-hero-actions .landing-btn-secondary,
.landing-hero-actions .landing-btn-secondary:visited {
  box-shadow: 0 10px 20px color-mix(in srgb, var(--landing-orange) 8%, transparent);
}

.landing-hero-art {
  min-height: 470px;
}

.landing-hero-image {
  right: 0;
  bottom: 28px;
  width: min(760px, 92%);
  transform-origin: 54% 62%;
}

.landing-floating-ui {
  width: min(220px, 27%);
}

.landing-floating-ui-one {
  left: 9%;
  top: 16%;
}

.landing-floating-ui-two {
  right: 7%;
  top: 6%;
}

.landing-feature-strip.container,
.landing-featured.container,
.landing-community.container,
.landing-stats.container {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
  padding-left: max(28px, calc((100vw - 1220px) / 2 + 28px));
  padding-right: max(28px, calc((100vw - 1220px) / 2 + 28px));
}

.landing-feature-strip,
.landing-featured,
.landing-community,
.landing-stats {
  overflow: hidden;
}

.landing-feature-strip {
  margin-top: 0;
  margin-bottom: 0;
  border-left: 0;
  border-right: 0;
}

.landing-featured {
  border-left: 0;
  border-right: 0;
}

.landing-community {
  margin-top: 24px;
  background: linear-gradient(135deg, var(--landing-orange), color-mix(in srgb, var(--landing-orange) 68%, #ffffff 32%));
}

.landing-stats {
  margin-bottom: 0;
  border-left: 0;
  border-right: 0;
}

.landing-tools small {
  display: none;
}

.landing-medugo,
.landing-medugo.container {
  display: grid;
  grid-template-columns: minmax(320px, 0.68fr) minmax(520px, 1.32fr);
  align-items: center;
  gap: clamp(28px, 5vw, 68px);
  min-height: 420px;
  padding-top: 42px;
  padding-bottom: 42px;
  background:
    radial-gradient(circle at 68% 38%, rgba(45, 102, 255, 0.28), transparent 34%),
    radial-gradient(circle at 94% 76%, rgba(20, 184, 166, 0.18), transparent 26%),
    linear-gradient(100deg, #071120 0%, #081733 58%, #06101f 100%);
  overflow: hidden;
}

.landing-medugo::before {
  background:
    radial-gradient(circle, rgba(125, 211, 252, 0.26) 0 1.5px, transparent 2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.5px);
  background-size: 44px 44px, 74px 74px;
  background-position: 0 0, 20px 22px;
  animation: medugoStarfield 16s linear infinite;
  opacity: 0.42;
}

.landing-medugo::after {
  background:
    radial-gradient(circle at 78% 18%, rgba(82, 135, 255, 0.22), transparent 28%),
    radial-gradient(circle at 54% 76%, rgba(139, 92, 246, 0.14), transparent 32%);
  animation: medugoGlowShift 8s ease-in-out infinite;
}

.landing-medugo-copy {
  padding-left: 0;
}

.landing-medugo-copy > p:first-child {
  gap: 14px;
  margin-bottom: 18px;
}

.landing-medugo-preview {
  justify-self: end;
  align-self: center;
  width: min(760px, 100%);
  max-width: 100%;
  margin: 16px 0 -48px;
  border-radius: 14px;
}

@keyframes medugoStarfield {
  from { background-position: 0 0, 20px 22px; }
  to { background-position: 44px 44px, 94px 96px; }
}

@keyframes medugoGlowShift {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

.landing-footer .logo span,
.landing-footer-brand .logo span {
  color: #fff;
}

@media (min-width: 721px) and (max-width: 1180px) {
  .landing-hero-grid {
    grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
    min-height: 390px;
  }

  .landing-hero-art {
    min-height: 380px;
  }

  .landing-hero-image {
    right: 0;
    bottom: 34px;
    width: min(510px, 88%);
  }

  .landing-floating-ui-one {
    left: 8%;
    top: 17%;
    width: min(150px, 25%);
  }

  .landing-floating-ui-two {
    right: 5%;
    top: 7%;
    width: min(150px, 25%);
  }

  .landing-medugo,
  .landing-medugo.container {
    grid-template-columns: minmax(270px, 0.66fr) minmax(390px, 1.34fr);
  }
}

/* Dark neon game treatment for the header MeduGO button. */
.landing-page #medugo-nav-link,
.landing-page #medugo-nav-link:visited,
.landing-page #medugo-nav-link.landing-medugo-btn,
.landing-page #medugo-nav-link.landing-medugo-btn:visited {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  border: 0 !important;
  border-radius: 11px;
  background:
    radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.28), transparent 27%),
    radial-gradient(circle at 82% 74%, rgba(225, 84, 120, 0.22), transparent 30%),
    linear-gradient(135deg, #070b16 0%, #0d1324 46%, #111827 100%) !important;
  color: #fff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 -12px 24px rgba(0, 0, 0, 0.28),
    0 10px 26px rgba(0, 0, 0, 0.16),
    0 0 22px color-mix(in srgb, var(--landing-orange) 26%, transparent);
  filter: none;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.24);
}

.landing-page #medugo-nav-link::before {
  content: "";
  position: absolute;
  inset: -45% -30%;
  z-index: -2;
  background:
    linear-gradient(115deg, transparent 0 26%, rgba(34, 211, 238, 0.34) 34%, transparent 43% 62%, color-mix(in srgb, var(--landing-orange) 46%, rgba(225, 84, 120, 0.36)) 70%, transparent 78%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 12px);
  opacity: 0.9;
  transform: translateX(-24%);
  animation: medugoButtonNeonSweep 4.2s linear infinite;
}

.landing-page #medugo-nav-link::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--medugo-btn-x, 20%) 50%, rgba(34, 211, 238, 0.24), transparent 25%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%);
  padding: 0;
  border: 0 !important;
  opacity: 0.85;
  -webkit-mask: none;
  mask: none;
  animation: medugoButtonCorePulse 3.6s ease-in-out infinite;
}

.landing-page #medugo-nav-link .landing-controller-icon,
.landing-page #medugo-nav-link .landing-controller-icon::before {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  text-shadow: 0 0 9px rgba(255, 255, 255, 0.44);
}

.landing-page #medugo-nav-link .medugo-wordmark {
  color: #fff !important;
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.28);
}

.landing-page #medugo-nav-link .logo-go {
  font-weight: 900;
}

.landing-page #medugo-nav-link:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 -12px 24px rgba(0, 0, 0, 0.3),
    0 12px 30px rgba(0, 0, 0, 0.2),
    0 0 28px color-mix(in srgb, var(--landing-orange) 34%, rgba(34, 211, 238, 0.2));
}

@keyframes medugoButtonNeonSweep {
  0% { transform: translateX(-28%) skewX(-10deg); }
  100% { transform: translateX(28%) skewX(-10deg); }
}

@keyframes medugoButtonCorePulse {
  0%, 100% {
    opacity: 0.58;
    --medugo-btn-x: 18%;
  }
  50% {
    opacity: 0.92;
    --medugo-btn-x: 82%;
  }
}

@media (max-width: 720px) {
  .landing-page #medugo-nav-link,
  .landing-page #medugo-nav-link:visited,
  .landing-page #medugo-nav-link.landing-medugo-btn,
  .landing-page #medugo-nav-link.landing-medugo-btn:visited {
    min-width: 122px;
    height: 40px;
    min-height: 40px;
    padding: 0 13px;
  }

  .landing-page #medugo-nav-link .medugo-wordmark {
    font-size: 12px;
  }
}

@media (max-width: 720px) {
  .landing-hero {
    padding-top: 34px;
    background:
      linear-gradient(120deg, var(--landing-panel) 0%, var(--landing-panel) 58%, color-mix(in srgb, var(--landing-orange) 8%, transparent) 100%);
  }

  .landing-hero::after {
    width: 100%;
    height: 380px;
    opacity: 0.36;
  }

  .landing-hero-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: 0;
  }

  .landing-hero-actions,
  .landing-hero-copy .landing-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .landing-hero-actions .landing-btn {
    min-width: 0;
    min-height: 44px;
    width: 100%;
    padding: 0 10px;
    font-size: 12px;
  }

  .landing-todo-btn {
    grid-column: 1 / -1;
  }

  .landing-hero-art {
    min-height: 300px;
  }

  .landing-hero-image {
    left: 50%;
    right: auto;
    bottom: 18px;
    width: min(322px, 80vw);
    transform: translateX(-50%);
  }

  .landing-floating-ui-one {
    left: 7%;
    top: 24%;
    width: min(118px, 30vw);
  }

  .landing-floating-ui-two {
    right: 9%;
    top: 9%;
    width: min(118px, 30vw);
  }

  .landing-feature-strip.container,
  .landing-featured.container,
  .landing-community.container,
  .landing-stats.container,
  .landing-medugo.container,
  .landing-medugo {
    padding-left: 16px;
    padding-right: 16px;
  }

  .landing-medugo,
  .landing-medugo.container {
    grid-template-columns: minmax(142px, 0.82fr) minmax(178px, 1.18fr);
    gap: 12px;
    min-height: 270px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .landing-medugo-copy h2 {
    font-size: clamp(20px, 6vw, 26px);
  }

  .landing-medugo-copy > p:nth-of-type(2) {
    font-size: 12px;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  .landing-medugo-copy > p:first-child {
    font-size: 18px;
    gap: 9px;
  }

  .landing-medugo .landing-btn-glow {
    width: fit-content;
    min-height: 40px;
    padding: 0 12px;
    font-size: 11px;
    gap: 7px;
  }

  .landing-medugo-preview {
    width: 100%;
    margin: 10px -2px -34px 0;
  }
}

@media (max-width: 520px) {
  .landing-header .landing-nav {
    gap: 7px;
  }

  .landing-page .landing-logo .logo-img {
    width: 32px;
    height: 32px;
  }

  .landing-logo {
    font-size: 18px;
  }

  .landing-header .landing-logo > span {
    display: none;
  }

  .landing-page #medugo-nav-link.landing-medugo-btn {
    min-height: 36px;
    padding: 4px 7px;
    font-size: 9px;
    gap: 4px;
  }

  .landing-page .landing-login,
  .landing-page .landing-login.has-pfp {
    min-height: 36px;
    width: auto;
    min-width: 0;
    max-width: 122px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .landing-page .landing-login.has-pfp .header-auth-pfp {
    width: 24px;
    height: 24px;
  }

  .landing-page .landing-login.has-pfp span {
    max-width: 62px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .landing-header .hamburger {
    width: 36px;
    height: 36px;
  }
}

/* Landing fixes 20260606 */
.landing-page .landing-logo,
.landing-page .landing-logo:visited,
.landing-page .landing-logo:hover,
.landing-page .landing-logo > span,
.landing-footer-brand .logo,
.landing-footer-brand .logo:visited,
.landing-footer .logo span,
.landing-footer-brand .logo span {
  color: #1f2937;
}

[data-theme="dark"] .landing-page .landing-logo,
[data-theme="dark"] .landing-page .landing-logo:visited,
[data-theme="dark"] .landing-page .landing-logo:hover,
[data-theme="dark"] .landing-page .landing-logo > span,
[data-theme="dark"] .landing-footer-brand .logo,
[data-theme="dark"] .landing-footer-brand .logo:visited,
[data-theme="dark"] .landing-footer .logo span,
[data-theme="dark"] .landing-footer-brand .logo span {
  color: #f8fafc;
}

.landing-page #medugo-nav-link .medugo-wordmark,
.landing-page .landing-footer-links .medugo-wordmark,
.landing-page .landing-mobile-medugo .medugo-wordmark {
  color: #1f2937;
}

[data-theme="dark"] .landing-page #medugo-nav-link .medugo-wordmark,
[data-theme="dark"] .landing-page .landing-footer-links .medugo-wordmark,
[data-theme="dark"] .landing-page .landing-mobile-medugo .medugo-wordmark {
  color: #f8fafc;
}

.landing-page #medugo-nav-link,
.landing-page #medugo-nav-link:visited,
.landing-page .landing-mobile-medugo .medugo-wordmark {
  background: color-mix(in srgb, var(--landing-panel) 88%, #ffffff 8%);
}

[data-theme="dark"] .landing-page #medugo-nav-link,
[data-theme="dark"] .landing-page #medugo-nav-link:visited,
[data-theme="dark"] .landing-page .landing-mobile-medugo .medugo-wordmark {
  background: #1f2937;
}

.landing-community {
  background: linear-gradient(135deg, #229ed9, #0088cc);
}

.landing-community-icon .material-icons {
  color: rgba(255, 255, 255, 0.66);
}

.landing-btn-light,
.landing-btn-light:visited {
  color: #0088cc;
}

.landing-btn-light:hover {
  color: #006ea6;
}

.landing-stats,
.landing-stats.container {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.landing-stats article {
  min-height: 108px;
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 17px;
  background: var(--landing-panel);
  box-shadow: var(--landing-shadow);
}

[data-theme="dark"] .landing-stats article {
  border-color: rgba(148, 163, 184, 0.18);
}

@media (max-width: 720px) {
  .landing-medugo,
  .landing-medugo.container {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
  }

  .landing-medugo-preview {
    justify-self: center;
    width: min(560px, 100%);
    margin: 2px 0 -22px;
  }

  .landing-stats,
  .landing-stats.container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .landing-header .landing-logo > span {
    display: inline;
  }

  .landing-page .landing-login {
    position: relative;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding: 0;
    font-size: 0;
    color: transparent;
  }

  .landing-page .landing-login::before {
    content: "login";
    color: var(--landing-orange);
    font-family: "Material Icons";
    font-size: 20px;
    font-weight: normal;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    -webkit-font-feature-settings: "liga";
    font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
  }

  [data-theme="dark"] .landing-page .landing-login::before {
    color: #f8fafc;
  }

  .landing-page .landing-login.has-pfp {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding: 0;
  }

  .landing-page .landing-login.has-pfp::before {
    content: none;
  }

  .landing-page .landing-login.has-pfp span {
    display: none;
  }
}

/* Landing visual tuning 20260606b */
.landing-hero {
  isolation: isolate;
}

.landing-hero-copy {
  position: relative;
  z-index: 3;
}

.landing-hero-copy h1,
.landing-hero-copy > p {
  text-shadow: 0 16px 34px color-mix(in srgb, var(--landing-panel) 72%, transparent);
}

.landing-hero-art {
  z-index: 1;
  display: grid;
  place-items: center;
}

.landing-hero-image {
  left: 50%;
  right: auto;
  bottom: 22px;
  width: min(710px, 92%);
  transform: translateX(-50%);
  z-index: 1;
}

.landing-floating-ui {
  z-index: 2;
  opacity: 0.86;
  will-change: transform;
  animation: landingFloatSoft 7s ease-in-out infinite;
}

.landing-floating-ui-one {
  left: 5%;
  top: 30%;
  width: min(190px, 25%);
}

.landing-floating-ui-two {
  right: 12%;
  top: 16%;
  width: min(176px, 23%);
  animation-delay: -2.6s;
}

@keyframes landingFloatSoft {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(0, -10px, 0) rotate(1deg); }
}

.landing-medugo-copy > p:first-child .landing-controller-icon {
  color: #8ea7ff;
}

.landing-medugo .landing-btn-glow {
  justify-self: center;
  min-width: 132px;
  min-height: 50px;
  margin-top: 2px;
  border-color: rgba(142, 167, 255, 0.46);
  background:
    linear-gradient(135deg, rgba(142, 167, 255, 0.24), rgba(142, 167, 255, 0.08)),
    #18233a;
  box-shadow: 0 16px 34px rgba(91, 118, 255, 0.24);
  overflow: hidden;
}

.landing-play-word {
  display: inline-block;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  animation: landingPlayPulse 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  will-change: transform, filter, opacity;
}

@keyframes landingPlayPulse {
  0%, 100% {
    opacity: 0.9;
    filter: blur(0);
    transform: scale(1) skewX(0deg) rotate(0deg);
  }
  38% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1.18) skewX(-10deg) rotate(-2deg);
  }
  66% {
    opacity: 0.78;
    filter: blur(1px);
    transform: scale(0.94) skewX(7deg) rotate(1deg);
  }
}

.landing-medugo::before {
  animation: medugoStarsFloatSoft 18s ease-in-out infinite;
  will-change: transform, opacity;
}

.landing-medugo::after {
  animation: medugoGlowShiftSoft 10s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes medugoStarsFloatSoft {
  0%, 100% { opacity: 0.34; transform: translate3d(0, 0, 0); }
  50% { opacity: 0.5; transform: translate3d(16px, -10px, 0); }
}

@keyframes medugoGlowShiftSoft {
  0%, 100% { opacity: 0.58; transform: translate3d(0, 0, 0) scale(1); }
  50% { opacity: 0.86; transform: translate3d(-8px, 6px, 0) scale(1.02); }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .landing-hero-image {
    left: 54%;
    width: min(520px, 88%);
  }

  .landing-floating-ui-one {
    left: 4%;
    top: 34%;
    width: min(145px, 24%);
  }

  .landing-floating-ui-two {
    right: 7%;
    top: 18%;
    width: min(140px, 23%);
  }
}

@media (max-width: 720px) {
  .landing-hero {
    min-height: 560px;
    padding-bottom: 46px;
  }

  .landing-hero-grid {
    position: relative;
    display: block;
    min-height: 0;
  }

  .landing-hero-copy {
    min-height: 478px;
    padding-top: 12px;
  }

  .landing-hero-copy h1,
  .landing-hero-copy > p {
    text-shadow:
      0 2px 0 color-mix(in srgb, var(--landing-panel) 74%, transparent),
      0 18px 32px color-mix(in srgb, var(--landing-panel) 82%, transparent);
  }

  .landing-hero-art {
    position: absolute;
    inset: 0 -16px;
    min-height: 100%;
    opacity: 0.34;
    pointer-events: none;
    z-index: 1;
  }

  .landing-hero-image {
    position: absolute;
    left: 50%;
    top: 122px;
    bottom: auto;
    width: min(460px, 116vw);
    transform: translateX(-50%);
  }

  .landing-floating-ui {
    opacity: 0.52;
    filter: blur(0.2px) drop-shadow(0 14px 20px rgba(15, 23, 42, 0.14));
  }

  .landing-floating-ui-one {
    left: 3%;
    top: 210px;
    width: min(146px, 39vw);
  }

  .landing-floating-ui-two {
    right: 4%;
    top: 142px;
    width: min(136px, 36vw);
  }

  .landing-stats,
  .landing-stats.container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .landing-stats article {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 86px;
    column-gap: 9px;
    padding: 13px 10px;
  }

  .landing-stats .material-icons {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 21px;
  }

  .landing-stats strong {
    font-size: 22px;
  }

  .landing-stats p {
    font-size: 11px;
    line-height: 1.2;
  }
}

@media (max-width: 520px) {
  .landing-page #medugo-nav-link.landing-medugo-btn {
    min-width: 92px;
    padding: 4px 10px;
    font-size: 10px;
    gap: 5px;
  }

  .landing-page .landing-login {
    display: inline-grid;
    place-items: center;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    line-height: 1;
  }

  .landing-page .landing-login::before {
    display: block;
    line-height: 1;
    transform: translateY(0);
  }

  .landing-hero {
    min-height: 540px;
  }

  .landing-hero-copy {
    min-height: 452px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-floating-ui,
  .landing-medugo::before,
  .landing-medugo::after,
  .landing-play-word {
    animation: none;
  }
}

/* Landing visual tuning corrections 20260606c */
.landing-medugo .landing-btn-glow {
  display: flex;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 720px) {
  .landing-hero-art {
    opacity: 1;
  }

  .landing-hero-image {
    opacity: 0.28;
  }

  .landing-floating-ui {
    opacity: 0.5;
  }
}

@media (max-width: 520px) {
  .landing-page #medugo-nav-link.landing-medugo-btn {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    padding: 4px 11px !important;
    font-size: 11px !important;
  }

  .landing-page .landing-login::before {
    transform: translateY(1px);
  }
}

/* Landing nav and motion tuning 20260606e */
.landing-page::before,
.landing-page main::before,
.landing-page main::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--landing-orange) 20%, transparent), transparent 64%);
  filter: blur(12px);
  opacity: 0.42;
  transform: translate3d(0, 0, 0);
  animation: landingLightDrift 18s ease-in-out infinite;
}

.landing-page::before {
  width: 34vw;
  height: 34vw;
  left: -14vw;
  top: 18vh;
}

.landing-page main::before {
  width: 30vw;
  height: 30vw;
  right: -12vw;
  top: 44vh;
  animation-delay: -6s;
}

.landing-page main::after {
  width: 24vw;
  height: 24vw;
  left: 24vw;
  bottom: -12vw;
  animation-delay: -11s;
}

@keyframes landingLightDrift {
  0%, 100% { opacity: 0.24; transform: translate3d(0, 0, 0) scale(1); }
  50% { opacity: 0.46; transform: translate3d(18px, -14px, 0) scale(1.04); }
}

.landing-header,
.landing-page main > * {
  position: relative;
  z-index: 1;
}

.landing-floating-ui {
  display: none !important;
}

.landing-hero-image {
  animation: landingBookBob 7.5s ease-in-out infinite;
  will-change: transform, filter;
}

@keyframes landingBookBob {
  0%, 100% { transform: translateX(-50%) translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translateX(-50%) translate3d(0, -12px, 0) rotate(-0.6deg); }
}

.landing-btn,
.landing-login,
.landing-medugo-btn,
.landing-carousel-btn {
  position: relative;
  isolation: isolate;
}

.landing-btn::after,
.landing-login::after,
.landing-medugo-btn::after,
.landing-carousel-btn::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid color-mix(in srgb, var(--landing-orange) 58%, transparent);
  opacity: 0.48;
  transform: scale(0.98);
  animation: landingOutlineBreath 3s ease-in-out infinite;
  pointer-events: none;
}

.landing-btn:hover::after,
.landing-login:hover::after,
.landing-medugo-btn:hover::after,
.landing-carousel-btn:hover::after {
  opacity: 0.9;
  transform: scale(1.02);
}

@keyframes landingOutlineBreath {
  0%, 100% { opacity: 0.32; transform: scale(0.99); }
  50% { opacity: 0.72; transform: scale(1.025); }
}

.landing-btn-glow::before {
  content: "";
  position: absolute;
  inset: -35% -55%;
  background: linear-gradient(100deg, transparent 34%, rgba(255, 255, 255, 0.42) 48%, transparent 62%);
  transform: translateX(-115%) skewX(-18deg);
  animation: landingPlayStreak 2.2s cubic-bezier(0.22, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}

.landing-play-word {
  position: relative;
  z-index: 1;
  animation:
    landingPlayPulse 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite,
    landingPlayZoomBy 2.2s cubic-bezier(0.17, 0.84, 0.28, 1) infinite;
}

@keyframes landingPlayStreak {
  0% { opacity: 0; transform: translateX(-115%) skewX(-18deg); }
  24% { opacity: 0; }
  42% { opacity: 0.9; }
  62% { opacity: 0; transform: translateX(115%) skewX(-18deg); }
  100% { opacity: 0; transform: translateX(115%) skewX(-18deg); }
}

@keyframes landingPlayZoomBy {
  0%, 18%, 100% { filter: blur(0); transform: translateX(0) scale(1) skewX(0deg); }
  36% { filter: blur(0); transform: translateX(-7px) scale(1.04) skewX(-8deg); }
  48% { filter: blur(0.4px); transform: translateX(9px) scale(1.22) skewX(-14deg); }
  62% { filter: blur(1.2px); transform: translateX(24px) scale(0.94) skewX(12deg); }
  76% { filter: blur(0); transform: translateX(0) scale(1) skewX(0deg); }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .landing-header {
    padding: 12px 0;
  }

  .landing-header .landing-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .landing-header .hamburger {
    display: none !important;
  }

  .landing-page .landing-nav-links,
  .landing-page .landing-nav-links.active,
  .landing-page .landing-nav-links.is-open {
    order: 2 !important;
    display: flex !important;
    flex: 0 1 auto;
    width: auto;
    gap: 8px;
    padding: 0;
    margin: 0 auto;
    border: 0;
    background: transparent;
  }

  .landing-page .landing-nav-links li {
    width: auto !important;
    flex: 0 0 auto !important;
  }

  .landing-page .landing-nav-links li > a {
    display: inline-grid;
    place-items: center;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--landing-orange) 24%, rgba(148, 163, 184, 0.34));
    border-radius: 13px;
    background: color-mix(in srgb, var(--landing-panel) 88%, #ffffff 5%);
    box-shadow: 0 10px 20px color-mix(in srgb, var(--landing-orange) 7%, transparent);
    color: var(--landing-text-strong);
    font-size: 0;
  }

  .landing-page .landing-nav-links li > a::before {
    font-family: "Material Icons";
    font-size: 21px;
    font-weight: normal;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    -webkit-font-feature-settings: "liga";
    font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
  }

  .landing-page .landing-nav-links li:nth-child(1) > a::before { content: "home"; }
  .landing-page .landing-nav-links li:nth-child(2) > a::before { content: "school"; }
  .landing-page .landing-nav-links li:nth-child(3) > a::before { content: "psychology"; }
  .landing-page .landing-nav-links li:nth-child(4) > a::before { content: "groups"; }
  .landing-page .landing-nav-links li:nth-child(5) > a::before { content: "info"; }

  .landing-page .landing-nav-links a::after,
  .landing-page .landing-nav-links .dropdown-toggle::after,
  .landing-page .landing-mobile-medugo {
    display: none !important;
  }

  .landing-page .landing-nav-links li > a:hover,
  .landing-page .landing-nav-links li > a.active {
    color: var(--landing-orange);
    transform: translateY(-1px);
  }

  .landing-page .landing-nav-links .dropdown {
    position: relative;
  }

  .landing-page .landing-nav-links .dropdown-menu {
    top: calc(100% + 10px);
    left: 50%;
    min-width: 148px;
    transform: translateX(-50%);
  }

  .landing-header .landing-actions {
    order: 3 !important;
    gap: 10px;
    margin-left: auto;
  }

  .landing-page #medugo-nav-link.landing-medugo-btn {
    min-width: 132px;
    height: 42px;
    min-height: 42px;
    padding: 0 16px;
    font-size: 13px;
  }

  .landing-page .landing-login {
    min-height: 42px;
    padding: 0 17px;
  }
}

@media (max-width: 720px) {
  .landing-page::before,
  .landing-page main::before,
  .landing-page main::after {
    filter: blur(16px);
    opacity: 0.26;
  }

  .landing-page .landing-nav-links .dropdown:hover .dropdown-menu {
    display: none;
  }

  .landing-page .landing-nav-links.active.has-open-dropdown,
  .landing-page .landing-nav-links.is-open.has-open-dropdown {
    align-items: start;
    overflow: hidden;
  }

  .landing-page .landing-nav-links.active.has-open-dropdown > li,
  .landing-page .landing-nav-links.is-open.has-open-dropdown > li {
    order: 1;
  }

  .landing-page .landing-nav-links .dropdown.open {
    display: contents;
  }

  .landing-page .landing-nav-links .dropdown.open .dropdown-toggle {
    grid-column: auto;
    order: 1;
  }

  .landing-page .landing-nav-links .dropdown.open .dropdown-menu {
    position: static !important;
    order: 2;
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin: 4px 0 0;
    padding: 8px;
    border-radius: 14px;
    transform: none !important;
    box-shadow: none;
    background: color-mix(in srgb, var(--landing-panel) 92%, var(--landing-orange) 4%);
  }

  .landing-page .landing-nav-links .dropdown.open .dropdown-menu a {
    min-height: 38px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 11px !important;
    white-space: nowrap;
  }

  .landing-hero-image {
    top: 86px;
    opacity: 0.22;
    filter: blur(1.4px) drop-shadow(0 24px 32px rgba(121, 54, 13, 0.12));
  }
}

@media (max-width: 520px) {
  .landing-header .landing-nav {
    gap: 8px;
  }

  .landing-header .landing-actions {
    gap: 8px;
  }

  .landing-page #medugo-nav-link.landing-medugo-btn {
    width: 124px !important;
    min-width: 124px !important;
    max-width: 124px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    gap: 6px !important;
  }

  .landing-page #medugo-nav-link .landing-controller-icon {
    font-size: 15px;
  }

  .landing-page .landing-login,
  .landing-page .landing-login.has-pfp,
  .landing-header .hamburger {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .landing-page .landing-login {
    max-width: 38px;
  }

  .landing-hero-image {
    top: 78px;
    width: min(430px, 112vw);
  }
}

/* Landing corrections 20260606i */
.landing-btn::after,
.landing-login::after,
.landing-medugo-btn::after,
.landing-carousel-btn::after {
  inset: -1px;
  border: 0;
  padding: 1px;
  opacity: 0.58;
  transform: none;
  background:
    conic-gradient(
      from var(--landing-outline-angle, 0deg),
      transparent 0deg 292deg,
      color-mix(in srgb, var(--landing-orange) 18%, transparent) 306deg,
      color-mix(in srgb, var(--landing-orange) 78%, #ffffff 10%) 323deg,
      color-mix(in srgb, var(--landing-orange) 18%, transparent) 340deg,
      transparent 360deg
    );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: landingOutlineTravel 1.45s linear infinite;
}

.landing-btn:hover::after,
.landing-login:hover::after,
.landing-medugo-btn:hover::after,
.landing-carousel-btn:hover::after {
  opacity: 0.76;
  transform: none;
}

@property --landing-outline-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes landingOutlineTravel {
  to { --landing-outline-angle: 360deg; }
}

.landing-btn-glow {
  overflow: hidden;
}

.landing-btn-glow::before {
  inset: -28% -36%;
  opacity: 0.42;
}

.landing-play-word {
  min-width: 46px;
  text-align: center;
  animation: landingPlayDriveIn 2.35s cubic-bezier(0.16, 0.86, 0.24, 1) infinite;
}

@keyframes landingPlayDriveIn {
  0%, 18% {
    opacity: 0;
    filter: blur(1.8px);
    transform: translateX(-150%) scale(0.82) skewX(-16deg);
  }
  34% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(-10%) scale(1.22) skewX(-13deg);
  }
  46%, 58% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1) skewX(0deg);
  }
  72% {
    opacity: 0;
    filter: blur(2.2px);
    transform: translateX(165%) scale(0.9) skewX(16deg);
  }
  100% {
    opacity: 0;
    filter: blur(2.2px);
    transform: translateX(165%) scale(0.9) skewX(16deg);
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .landing-page .landing-nav-links,
  .landing-page .landing-nav-links.active,
  .landing-page .landing-nav-links.is-open {
    gap: 12px;
  }

  .landing-page .landing-nav-links li > a {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 40px !important;
    min-height: 40px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .landing-page .landing-nav-links li > a::before {
    font-size: 24px;
  }

  .landing-page .landing-nav-links li > a:hover,
  .landing-page .landing-nav-links li > a.active {
    background: transparent !important;
    color: var(--landing-orange);
    transform: translateY(-1px);
  }

  .landing-page .landing-nav-links li > a::after {
    display: none !important;
  }

  .landing-page #medugo-nav-link.landing-medugo-btn {
    min-width: 144px;
    height: 42px;
    min-height: 42px;
    padding: 0 18px;
    font-size: 14px;
  }

  .landing-page #medugo-nav-link .landing-controller-icon {
    font-size: 16px;
  }

  .landing-page .landing-login,
  .landing-page .landing-login:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 42px;
    height: 42px;
    padding: 0 18px;
    font-size: 15px;
    line-height: 1;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .landing-hero {
    min-height: 470px;
    padding-top: 30px;
    padding-bottom: 18px;
  }

  .landing-hero-copy {
    min-height: 382px;
  }

  .landing-hero-image {
    top: 26px;
    width: min(430px, 116vw);
    opacity: 0.13;
    filter: blur(2px) drop-shadow(0 20px 26px rgba(121, 54, 13, 0.1));
  }
}

@media (max-width: 520px) {
  .landing-hero {
    min-height: 462px;
    padding-bottom: 12px;
  }

  .landing-hero-copy {
    min-height: 374px;
  }

  .landing-hero-image {
    top: 18px;
    width: min(420px, 114vw);
    opacity: 0.12;
  }

  .landing-page .landing-login.has-pfp,
  .landing-page .landing-actions .landing-login.has-pfp,
  .landing-header .landing-login.has-pfp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 13px;
  }

  .landing-page .landing-login.has-pfp .header-auth-pfp,
  .landing-header .landing-login.has-pfp .header-auth-pfp {
    width: 30px;
    height: 30px;
    margin: 0;
    border-radius: 999px;
  }

  .landing-page .landing-login.has-pfp span,
  .landing-header .landing-login.has-pfp span {
    display: none !important;
  }
}

/* Keep hero artwork synced with the selected accent color. */
.landing-hero-image {
  filter: var(--landing-art-filter) drop-shadow(0 30px 50px rgba(121, 54, 13, 0.16));
}

@media (max-width: 720px) {
  .landing-hero-image {
    filter: var(--landing-art-filter) blur(2px) drop-shadow(0 20px 26px rgba(121, 54, 13, 0.1));
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-page::before,
  .landing-page main::before,
  .landing-page main::after,
  .landing-hero-image,
  .landing-btn::after,
  .landing-login::after,
  .landing-medugo-btn::after,
  .landing-carousel-btn::after,
  .landing-btn-glow::before {
    animation: none !important;
  }
}

/* Landing typography and hamburger cleanup 20260606l */
.landing-header .hamburger,
.landing-page .hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.landing-header .hamburger span,
.landing-page .hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--landing-text-strong);
}

.landing-header .hamburger:hover,
.landing-page .hamburger:hover {
  transform: none;
  background: transparent;
  border-color: transparent;
}

.landing-header .hamburger:hover span,
.landing-page .hamburger:hover span {
  width: 22px;
}

.landing-header .hamburger.is-open span:nth-child(1),
.landing-page .hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.landing-header .hamburger.is-open span:nth-child(3),
.landing-page .hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 720px) {
  .landing-header .hamburger,
  .landing-page .hamburger {
    display: inline-flex !important;
  }
}

.landing-page {
  font-weight: 400;
}

.landing-page .landing-logo,
.landing-page .landing-footer-brand .logo {
  font-weight: 700;
}

.landing-hero-copy h1 {
  font-weight: 600;
}

.landing-section-head h2,
.landing-medugo-copy h2,
.landing-community h2 {
  font-weight: 600;
}

.landing-feature-strip h2,
.landing-tool-card h3,
.landing-course-card h3,
.landing-stats strong {
  font-weight: 600;
}

.landing-btn,
.landing-page .landing-login,
.landing-medugo-btn,
.landing-page #medugo-nav-link,
.landing-page #medugo-nav-link .medugo-wordmark,
.landing-page .landing-nav-links a,
.landing-footer-links a,
.landing-footer-bottom a {
  font-weight: 500;
}

.landing-course-pill,
.landing-course-price,
.landing-upcoming,
.landing-learners strong,
.landing-play-word {
  font-weight: 600;
}

/* Landing header labels and play timing 20260607a */
.landing-header .landing-nav,
.landing-header .landing-actions,
.landing-page #medugo-nav-link,
.landing-page .landing-login,
.landing-header .hamburger {
  align-items: center;
}

.landing-page #medugo-nav-link,
.landing-page .landing-login,
.landing-header .hamburger {
  justify-content: center;
}

.landing-page #medugo-nav-link .landing-controller-icon,
.landing-header .hamburger span,
.landing-page .landing-login::before {
  flex: 0 0 auto;
}

@media (min-width: 721px) and (max-width: 1180px) {
  .landing-page .landing-nav-links li > a {
    align-items: center;
    justify-items: center;
  }

  .landing-page .landing-nav-links li > a::before {
    display: block;
    line-height: 1;
    transform: translateY(0);
  }

  .landing-page .landing-nav-links li:nth-child(1) > a::before { content: "home" !important; }
  .landing-page .landing-nav-links li:nth-child(2) > a::before { content: "school" !important; }
  .landing-page .landing-nav-links li:nth-child(3) > a::before { content: "psychology" !important; }
  .landing-page .landing-nav-links li:nth-child(4) > a::before { content: "groups" !important; }
}

@media (max-width: 720px) {
  .landing-page .landing-nav-links li > a,
  .landing-page .landing-nav-links .dropdown.open .dropdown-toggle {
    display: grid !important;
    grid-template-rows: 24px auto;
    place-items: center;
    gap: 3px;
    min-height: 54px;
    padding: 5px 2px 6px !important;
    font-size: 0 !important;
    line-height: 1;
  }

  .landing-page .landing-nav-links li > a::before {
    display: block;
    line-height: 1;
    transform: translateY(0);
  }

  .landing-page .landing-nav-links li > a::after,
  .landing-page .landing-nav-links .dropdown-toggle::after {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    background: none !important;
    color: var(--landing-text);
    transform: none !important;
    font-family: "Poppins", "Cairo", sans-serif;
    font-size: 7px;
    font-weight: 500;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
    opacity: 1;
  }

  .landing-page .landing-nav-links li:nth-child(1) > a::after { content: "Home"; }
  .landing-page .landing-nav-links li:nth-child(2) > a::after { content: "Courses"; }
  .landing-page .landing-nav-links li:nth-child(3) > a::after { content: "Study"; }
  .landing-page .landing-nav-links li:nth-child(4) > a::after { content: "Social"; }

  .landing-page .landing-nav-links a.active::after {
    color: var(--landing-orange);
  }

  .landing-page .landing-nav-links .dropdown.open .dropdown-menu {
    margin-top: 6px;
  }
}

.landing-play-word {
  animation: landingPlayBrakeRun 2.65s cubic-bezier(0.18, 0.9, 0.22, 1) infinite;
}

@keyframes landingPlayBrakeRun {
  0% {
    opacity: 0;
    filter: blur(1.8px);
    transform: translateX(-155%) scale(0.82) skewX(-18deg);
  }
  8% {
    opacity: 1;
    filter: blur(0.4px);
    transform: translateX(18%) scale(1.14) skewX(-13deg);
  }
  14% {
    opacity: 0;
    filter: blur(2px);
    transform: translateX(160%) scale(0.9) skewX(16deg);
  }
  22% {
    opacity: 0;
    filter: blur(1.6px);
    transform: translateX(-145%) scale(0.86) skewX(-16deg);
  }
  31% {
    opacity: 1;
    filter: blur(0.3px);
    transform: translateX(28%) scale(1.18) skewX(-12deg);
  }
  38% {
    opacity: 0;
    filter: blur(2px);
    transform: translateX(155%) scale(0.92) skewX(14deg);
  }
  48% {
    opacity: 0;
    filter: blur(1.2px);
    transform: translateX(-120%) scale(0.9) skewX(-12deg);
  }
  62% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(18%) scale(1.22) skewX(-10deg);
  }
  72% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(-5%) scale(0.98) skewX(3deg);
  }
  80%, 100% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1) skewX(0deg);
  }
}

/* Optical vertical centering 20260607c */
@media (min-width: 721px) and (max-width: 1180px) {
  .landing-page .landing-nav-links li > a::before {
    transform: translateY(2px);
  }
}

@media (max-width: 720px) {
  .landing-page .landing-nav-links li > a::before {
    transform: translateY(2px);
  }

  .landing-page .landing-login::before {
    transform: translateY(3px);
  }
}

/* Landing Community dropdown layering/layout 20260608b */
.landing-header {
  z-index: 2000;
  overflow: visible;
}

.landing-header .landing-nav,
.landing-page .landing-nav-links,
.landing-page .landing-nav-links .dropdown {
  overflow: visible;
}

.landing-page .landing-nav-links .dropdown {
  position: relative;
}

.landing-page .landing-nav-links .dropdown-menu {
  z-index: 5000;
  border: 1px solid color-mix(in srgb, var(--landing-orange) 24%, rgba(148, 163, 184, 0.28));
  background: color-mix(in srgb, var(--landing-panel) 94%, #ffffff 6%);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
}

@media (min-width: 1181px) {
  .landing-page .landing-nav-links .dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    display: none;
    grid-template-columns: 1fr;
    gap: 6px;
    min-width: 172px;
    padding: 8px;
    border-radius: 14px;
    transform: translateX(-50%);
  }

  .landing-page .landing-nav-links .dropdown:hover .dropdown-menu,
  .landing-page .landing-nav-links .dropdown.open .dropdown-menu {
    display: grid;
  }

  .landing-page .landing-nav-links .dropdown-menu a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--landing-text-strong);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
  }

  .landing-page .landing-nav-links .dropdown-menu a:hover {
    color: var(--landing-orange);
    background: color-mix(in srgb, var(--landing-orange) 10%, transparent);
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .landing-page .landing-nav-links .dropdown.open,
  .landing-page .landing-nav-links .dropdown:hover {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .landing-page .landing-nav-links .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    left: 50% !important;
    right: auto !important;
    display: none !important;
    grid-template-columns: repeat(3, minmax(82px, 1fr)) !important;
    gap: 8px !important;
    width: max-content !important;
    min-width: 286px !important;
    margin: 0 !important;
    padding: 8px !important;
    border-radius: 14px !important;
    transform: translateX(-50%) !important;
  }

  .landing-page .landing-nav-links .dropdown:hover .dropdown-menu,
  .landing-page .landing-nav-links .dropdown.open .dropdown-menu {
    display: grid !important;
  }

  .landing-page .landing-nav-links .dropdown-menu a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 10px !important;
    border: 0;
    border-radius: 10px;
    background: color-mix(in srgb, var(--landing-orange) 7%, transparent);
    color: var(--landing-text-strong);
    font-size: 12px !important;
    font-weight: 500;
    white-space: nowrap;
  }

  .landing-page .landing-nav-links .dropdown-menu a:hover {
    color: var(--landing-orange);
    background: color-mix(in srgb, var(--landing-orange) 12%, transparent);
  }
}

/* Landing header compact desktop/tablet polish 20260608c */
@media (min-width: 721px) {
  .landing-header {
    padding: 10px 0;
  }

  .landing-page .landing-logo .logo-img {
    width: 34px;
    height: 34px;
  }

  .landing-logo {
    font-size: 21px;
  }

  .landing-page #medugo-nav-link,
  .landing-page #medugo-nav-link:visited,
  .landing-medugo-btn,
  .landing-medugo-btn:visited,
  .landing-page .landing-login,
  .landing-page .landing-login:visited {
    height: 38px;
    min-height: 38px;
    border-radius: 12px;
  }

  .landing-page #medugo-nav-link,
  .landing-page #medugo-nav-link:visited,
  .landing-medugo-btn,
  .landing-medugo-btn:visited {
    padding: 0 16px;
    min-width: 128px;
    font-size: 13px;
  }

  .landing-page .landing-login,
  .landing-page .landing-login:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 0 16px;
    font-size: 14px;
    line-height: 1;
  }

  .landing-page .landing-login.has-pfp,
  .landing-page .landing-actions .landing-login.has-pfp,
  .landing-header .landing-login.has-pfp {
    min-width: 118px;
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
  }

  .landing-page .landing-login.has-pfp .header-auth-pfp,
  .landing-header .landing-login.has-pfp .header-auth-pfp {
    width: 26px;
    height: 26px;
  }
}

/* Bridge breakpoint: hamburger nav, tablet-style Community overlay. */
@media (min-width: 641px) and (max-width: 720px) {
  .landing-page .landing-nav-links.active.has-open-dropdown,
  .landing-page .landing-nav-links.is-open.has-open-dropdown {
    overflow: visible;
  }

  .landing-page .landing-nav-links .dropdown.open {
    display: block;
    position: relative;
  }

  .landing-page .landing-nav-links .dropdown.open .dropdown-toggle {
    display: grid !important;
  }

  .landing-page .landing-nav-links .dropdown.open .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 50% !important;
    right: auto !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(82px, 1fr)) !important;
    gap: 8px !important;
    width: max-content !important;
    min-width: 286px !important;
    margin: 0 !important;
    padding: 8px !important;
    border: 1px solid color-mix(in srgb, var(--landing-orange) 24%, rgba(148, 163, 184, 0.28)) !important;
    border-radius: 14px !important;
    background: color-mix(in srgb, var(--landing-panel) 94%, #ffffff 6%) !important;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14) !important;
    transform: translateX(-50%) !important;
    z-index: 5000;
  }

  .landing-page .landing-nav-links .dropdown.open .dropdown-menu a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 10px;
    background: color-mix(in srgb, var(--landing-orange) 7%, transparent) !important;
    color: var(--landing-text-strong);
    font-size: 12px !important;
    font-weight: 500;
    white-space: nowrap;
  }
}

/* Tablet clicked Community menu should match hover overlay instead of entering the header. */
@media (min-width: 721px) and (max-width: 1180px) {
  .landing-page .landing-nav-links.has-open-dropdown .dropdown.open {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .landing-page .landing-nav-links.has-open-dropdown .dropdown.open .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    left: 50% !important;
    right: auto !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(82px, 1fr)) !important;
    gap: 8px !important;
    width: max-content !important;
    min-width: 286px !important;
    margin: 0 !important;
    padding: 8px !important;
    border: 1px solid color-mix(in srgb, var(--landing-orange) 24%, rgba(148, 163, 184, 0.28)) !important;
    border-radius: 14px !important;
    background: color-mix(in srgb, var(--landing-panel) 94%, #ffffff 6%) !important;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14) !important;
    transform: translateX(-50%) !important;
    overflow: visible !important;
    z-index: 5000;
  }

  .landing-page .landing-nav-links.has-open-dropdown .dropdown.open .dropdown-menu a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 10px;
    background: color-mix(in srgb, var(--landing-orange) 7%, transparent) !important;
    color: var(--landing-text-strong);
    font-size: 12px !important;
    font-weight: 500;
    white-space: nowrap;
  }
}

/* Final header MeduGO neon skin. Keep after font/header overrides. */
.landing-page #medugo-nav-link,
.landing-page #medugo-nav-link:visited,
.landing-page #medugo-nav-link.landing-medugo-btn,
.landing-page #medugo-nav-link.landing-medugo-btn:visited {
  position: relative !important;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  height: 36px;
  min-height: 36px;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 11px;
  background:
    radial-gradient(circle at 18% 16%, rgba(34, 211, 238, 0.12), transparent 20%),
    radial-gradient(circle at 84% 76%, color-mix(in srgb, var(--landing-orange) 18%, transparent), transparent 22%),
    linear-gradient(135deg, #030611 0%, #070b17 48%, #0b1020 100%) !important;
  color: #fff !important;
  box-shadow:
    inset 0 -14px 22px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.22),
    0 0 16px color-mix(in srgb, var(--landing-orange) 18%, transparent) !important;
  filter: none !important;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.8),
    0 0 8px rgba(34, 211, 238, 0.28);
}

.landing-page #medugo-nav-link::before {
  content: "" !important;
  position: absolute;
  inset: -18%;
  z-index: 0;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  background:
    radial-gradient(circle at 17% 34%, rgba(34, 211, 238, 0.24) 0 5px, transparent 8px),
    radial-gradient(circle at 74% 26%, color-mix(in srgb, var(--landing-orange) 30%, rgba(225, 84, 120, 0.18)) 0 4px, transparent 8px),
    radial-gradient(circle at 42% 78%, rgba(124, 58, 237, 0.18) 0 4px, transparent 9px),
    radial-gradient(circle at 88% 64%, rgba(34, 211, 238, 0.18) 0 3px, transparent 7px),
    linear-gradient(100deg, transparent 0 42%, rgba(255, 255, 255, 0.08) 49%, transparent 56%) !important;
  opacity: 0.82;
  transform: translate3d(-2%, 0, 0) scale(1);
  filter: blur(0.2px);
  animation: medugoButtonNeonDrift 7.4s cubic-bezier(0.45, 0, 0.3, 1) infinite alternate !important;
}

.landing-page #medugo-nav-link::after {
  content: "" !important;
  position: absolute;
  inset: 0 !important;
  z-index: 1;
  display: block !important;
  border: 0 !important;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 32%,
    color-mix(in srgb, var(--landing-orange) 18%, transparent) 38%,
    color-mix(in srgb, var(--landing-orange) 62%, #ffffff 38%) 44%,
    var(--landing-orange) 50%,
    color-mix(in srgb, var(--landing-orange) 70%, #ffffff 30%) 56%,
    rgba(255, 255, 255, 0.54) 62%,
    transparent 68%,
    transparent 100%
  );
  background-size: 260% 260%;
  background-position: 160% 50%;
  padding: 1.6px !important;
  opacity: 0.92;
  transform: none !important;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) !important;
  mask-composite: exclude !important;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--landing-orange) 34%, transparent));
  will-change: background-position;
  animation: medugoButtonOutlineGlide 8.5s linear infinite !important;
  pointer-events: none;
}

.landing-page #medugo-nav-link .landing-controller-icon,
.landing-page #medugo-nav-link .landing-controller-icon::before {
  position: relative;
  z-index: 2;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 15px;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.9),
    0 0 8px rgba(255, 255, 255, 0.34),
    0 0 12px rgba(34, 211, 238, 0.24);
}

.landing-page #medugo-nav-link .medugo-wordmark {
  position: relative;
  z-index: 2;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.95),
    0 2px 7px rgba(0, 0, 0, 0.58),
    0 0 8px rgba(34, 211, 238, 0.34),
    0 0 14px color-mix(in srgb, var(--landing-orange) 22%, transparent);
}

.landing-page #medugo-nav-link .logo-go {
  display: inline-block;
  font-weight: 900 !important;
  background-image: linear-gradient(90deg, #00F2FE, #42E3B4, #E15478, #8b5cf6, #00F2FE) !important;
  background-size: 260% 100% !important;
  background-position: 0% 50%;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  text-shadow: none !important;
  filter: none !important;
  -webkit-text-stroke: 0 transparent !important;
  animation: medugoGoTextFlow 2.6s linear infinite !important;
}

.landing-page #medugo-nav-link:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 -14px 22px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.26),
    0 0 22px color-mix(in srgb, var(--landing-orange) 28%, rgba(34, 211, 238, 0.18)) !important;
}

@property --medugo-outline-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes medugoButtonNeonDrift {
  0% {
    opacity: 0.52;
    transform: translate3d(-4%, -2%, 0) scale(1.02) rotate(-1deg);
  }
  19% {
    opacity: 0.86;
    transform: translate3d(3%, 5%, 0) scale(1.05) rotate(1deg);
  }
  37% {
    opacity: 0.62;
    transform: translate3d(-1%, 8%, 0) scale(1) rotate(-2deg);
  }
  58% {
    opacity: 0.92;
    transform: translate3d(5%, -4%, 0) scale(1.07) rotate(2deg);
  }
  81% {
    opacity: 0.7;
    transform: translate3d(-6%, 3%, 0) scale(1.03) rotate(0deg);
  }
  100% {
    opacity: 0.84;
    transform: translate3d(4%, -1%, 0) scale(1.04) rotate(1deg);
  }
}

@keyframes medugoButtonOutlineGlide {
  0% {
    background-position: 160% 50%;
  }
  100% {
    background-position: -60% 50%;
  }
}

@keyframes medugoGoTextFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: -180% 50%;
  }
}

/* Sticky minimized landing header */
.landing-page .landing-header {
  position: sticky;
  top: 0;
  z-index: 6000;
  transition:
    padding 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    backdrop-filter 180ms ease;
}

.landing-page .landing-header.is-scrolled {
  padding: 7px 0;
  background: color-mix(in srgb, var(--landing-panel) 74%, transparent);
  border-bottom-color: color-mix(in srgb, var(--landing-orange) 22%, rgba(148, 163, 184, 0.18));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.landing-page .landing-header.is-scrolled .landing-logo .logo-img {
  width: 30px;
  height: 30px;
}

.landing-page .landing-header.is-scrolled .landing-logo {
  font-size: 19px;
}

.landing-page .landing-header.is-scrolled #medugo-nav-link,
.landing-page .landing-header.is-scrolled #medugo-nav-link:visited,
.landing-page .landing-header.is-scrolled .landing-login,
.landing-page .landing-header.is-scrolled .landing-login:visited {
  height: 34px;
  min-height: 34px;
}

@media (max-width: 720px) {
  .landing-page .landing-header.is-scrolled {
    padding: 6px 0;
    background: color-mix(in srgb, var(--landing-panel) 68%, transparent);
  }

  .landing-page .landing-header.is-scrolled .landing-logo .logo-img {
    width: 28px;
    height: 28px;
  }

  .landing-page .landing-header.is-scrolled #medugo-nav-link,
  .landing-page .landing-header.is-scrolled #medugo-nav-link:visited,
  .landing-page .landing-header.is-scrolled .landing-login,
  .landing-page .landing-header.is-scrolled .landing-login:visited {
    height: 36px;
    min-height: 36px;
  }
}

@media (max-width: 720px) {
  .landing-page #medugo-nav-link,
  .landing-page #medugo-nav-link:visited,
  .landing-page #medugo-nav-link.landing-medugo-btn,
  .landing-page #medugo-nav-link.landing-medugo-btn:visited {
    min-width: 122px;
    height: 40px;
    min-height: 40px;
    padding: 0 13px !important;
  }

  .landing-page #medugo-nav-link .medugo-wordmark {
    font-size: 13px !important;
  }

  .landing-page #medugo-nav-link .landing-controller-icon {
    font-size: 15px;
  }
}

/* Universal site header/footer support for non-MeduGO pages */
.universal-layout-page {
  --landing-orange: var(--primary-color);
  --landing-orange-soft: color-mix(in srgb, var(--primary-color) 12%, #fff);
  --landing-panel: var(--background-primary);
  --landing-panel-soft: var(--background-secondary);
  --landing-text-strong: var(--text-primary);
  --landing-text: var(--text-secondary);
}

.universal-layout-page .landing-header {
  background: color-mix(in srgb, var(--landing-panel) 96%, transparent);
}

.universal-layout-page .landing-nav {
  gap: 28px;
}

.universal-layout-page .landing-logo {
  color: var(--landing-orange);
  font-size: 21px;
  font-weight: 800;
}

.universal-layout-page .landing-logo:visited,
.universal-layout-page .landing-logo:hover {
  color: var(--landing-orange);
}

.universal-layout-page .landing-logo .logo-img {
  width: 34px;
  height: 34px;
}

.universal-layout-page .landing-nav-links {
  flex: 1;
  justify-content: center;
  gap: 38px;
  margin: 0;
}

.universal-layout-page .landing-nav-links a {
  color: var(--landing-text-strong);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 0;
}

.universal-layout-page .landing-nav-links a:hover,
.universal-layout-page .landing-nav-links a.active {
  color: var(--landing-orange);
}

.universal-layout-page .landing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.universal-layout-page .landing-mobile-medugo {
  display: none;
}

.universal-layout-page .landing-footer {
  margin-top: 60px;
}

.universal-layout-page .landing-footer-brand .logo span,
.universal-layout-page .landing-footer-brand .logo:visited span {
  color: var(--landing-orange);
}

.universal-layout-page .landing-footer-brand p,
.universal-layout-page .landing-footer-bottom p,
.universal-layout-page .landing-footer-links a,
.universal-layout-page .landing-footer-bottom a {
  color: var(--landing-text);
}

.universal-layout-page .landing-footer-bottom > div {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 520px) {
  .universal-layout-page .landing-footer-bottom > div {
    width: 100%;
    gap: 10px 14px;
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .universal-layout-page .landing-nav-links {
    gap: 12px;
  }

  .universal-layout-page .landing-nav-links li > a {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 40px !important;
    min-height: 40px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0 !important;
  }

  .universal-layout-page .landing-nav-links li > a::before {
    content: none !important;
    display: none !important;
  }

  .universal-layout-page .landing-nav-links .nav-context-icon {
    display: block;
    font-size: 24px;
    line-height: 1;
  }
}

/* Header notifications stay independent from the account control. */
.header-notification-wrap { position: relative; flex: 0 0 auto; }
.header-notification-btn { position: relative; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid color-mix(in srgb, var(--landing-orange) 28%, #64748b 38%); border-radius: 12px; background: color-mix(in srgb, var(--landing-panel) 88%, #fff 8%); color: var(--landing-text-strong); cursor: pointer; }
.header-notification-btn:hover { color: var(--landing-orange); border-color: var(--landing-orange); }
.header-notification-btn .material-symbols-outlined { font-size: 21px; }
.header-notification-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--landing-panel); border-radius: 999px; background: var(--primary-color); color: #fff; font-size: 10px; font-weight: 800; line-height: 14px; }
.header-notification-panel { position: absolute; top: calc(100% + 10px); right: 0; width: min(360px, calc(100vw - 28px)); overflow: hidden; border: 1px solid var(--border-color); border-radius: 14px; background: var(--background-primary); box-shadow: 0 18px 44px rgba(15,23,42,.18); }
.header-notification-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border-color); color: var(--text-primary); }
.header-notification-heading button { border: 0; background: transparent; color: var(--primary-color); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.header-notification-list { max-height: 360px; overflow: auto; }
.header-notification-list > p { margin: 0; padding: 18px; text-align: center; font-size: 13px; }
.header-notification-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border-color); color: inherit; text-decoration: none; }
.header-notification-item:hover { background: var(--background-secondary); color: inherit; }
.header-notification-item.unread { background: color-mix(in srgb, var(--primary-color) 7%, var(--background-primary)); }
.header-notification-item .material-symbols-outlined { color: var(--primary-color); font-size: 20px; }
.header-notification-item strong { display: block; color: var(--text-primary); font-size: 13px; }
.header-notification-item small { display: block; margin-top: 2px; color: var(--text-secondary); font-size: 11px; line-height: 1.4; }
.header-notification-item small { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:3; }

@media (max-width: 900px) {
  .universal-layout-page .landing-header .landing-nav {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
  }

  .universal-layout-page .landing-actions {
    order: 2;
  }

  .universal-layout-page .hamburger {
    order: 3;
  }

  .universal-layout-page .landing-nav-links {
    display: none;
    order: 4;
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr)) max-content;
    gap: 10px;
    padding: 12px;
  }

  .universal-layout-page .landing-nav-links.is-open,
  .universal-layout-page .landing-nav-links.active {
    display: grid;
  }

  .universal-layout-page .landing-mobile-medugo {
    display: block;
  }

  .universal-layout-page .landing-medugo-btn {
    display: none !important;
  }
}

/* Keep universal pages in the same header/footer theme context as the landing page. */
.landing-page.universal-layout-page {
  --landing-orange: var(--primary-color);
  --landing-orange-soft: color-mix(in srgb, var(--primary-color) 12%, #fff);
  --landing-muted: #667085;
  --landing-ink: #101828;
  --landing-shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
  --landing-panel: #fff;
  --landing-panel-soft: #fff8f4;
  --landing-text-strong: #101828;
  --landing-text: #344054;
}

[data-theme="dark"] .landing-page.universal-layout-page {
  --landing-orange-soft: color-mix(in srgb, var(--primary-color) 18%, #0f172a);
  --landing-muted: #b8c4d6;
  --landing-ink: #f8fafc;
  --landing-panel: #101827;
  --landing-panel-soft: #151f2f;
  --landing-text-strong: #f8fafc;
  --landing-text: #d4dce8;
}

.landing-page.universal-layout-page .landing-footer {
  margin-top: 0;
}

.landing-page.universal-layout-page .landing-footer-brand p {
  color: #667085;
}

.landing-page.universal-layout-page .landing-footer-links a,
.landing-page.universal-layout-page .landing-footer-links a:visited,
.landing-page.universal-layout-page .landing-footer-bottom a,
.landing-page.universal-layout-page .landing-footer-bottom a:visited {
  color: #344054;
}

[data-theme="dark"] .landing-page.universal-layout-page .landing-footer-brand p,
[data-theme="dark"] .landing-page.universal-layout-page .landing-footer-links a,
[data-theme="dark"] .landing-page.universal-layout-page .landing-footer-links a:visited,
[data-theme="dark"] .landing-page.universal-layout-page .landing-footer-bottom a,
[data-theme="dark"] .landing-page.universal-layout-page .landing-footer-bottom a:visited {
  color: #d4dce8;
}

/* Final tablet header parity: keep landing/universal header compact and unwrapped. */
@media (min-width: 721px) and (max-width: 1180px) {
  .landing-page .landing-header .landing-nav {
    position: relative;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 12px;
  }

  .landing-page .landing-header .hamburger {
    display: none !important;
  }

  .landing-page .landing-header .landing-logo {
    order: 1;
  }

  .landing-page .landing-header .landing-nav-links,
  .landing-page .landing-header .landing-nav-links.active,
  .landing-page .landing-header .landing-nav-links.is-open {
    order: 2;
    position: static;
    display: flex !important;
    flex: 1 1 auto;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    justify-content: center;
    transform: none;
    z-index: 2;
  }

  .landing-page .landing-header .landing-actions {
    order: 3;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .landing-page .landing-header .landing-nav-links li > a,
  .landing-page .landing-header .landing-nav-links .dropdown-toggle {
    display: inline-grid !important;
    place-items: center !important;
    align-items: center !important;
    justify-items: center !important;
    padding: 0 !important;
    text-align: center;
    line-height: 1;
  }

  .landing-page .landing-header .landing-nav-links li > a::before,
  .landing-page .landing-header .landing-nav-links .dropdown-toggle::before {
    content: none !important;
    display: none !important;
  }

  .landing-page.universal-layout-page .landing-header .landing-nav-links li > a .nav-context-icon,
  .landing-page.universal-layout-page .landing-header .landing-nav-links .dropdown-toggle .nav-context-icon {
    display: block !important;
    margin: 0 !important;
    font-size: 24px !important;
    line-height: 1 !important;
    transform: translateY(1px) !important;
  }
}

/* Final universal header alignment. */
.universal-layout-page .landing-nav-links .nav-context-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1 !important;
  vertical-align: middle;
  transform: translateY(1px);
}

.universal-layout-page .header-notification-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 13px;
}

/* Responsive navigation icons: labels on desktop, centered icons on compact headers. */
@media (min-width: 1181px) {
  .universal-layout-page .landing-nav-links .nav-context-icon { display: none !important; }
}
@media (max-width: 1180px) {
  .universal-layout-page .landing-nav-links .nav-context-icon { transform: none !important; vertical-align: middle; }
}

/* Canonical universal navigation: neutralize legacy pseudo-icons and labels. */
.universal-layout-page .landing-header .landing-nav-links li > a::before,
.universal-layout-page .landing-header .landing-nav-links li > a::after,
.universal-layout-page .landing-header .landing-nav-links .dropdown-toggle::before,
.universal-layout-page .landing-header .landing-nav-links .dropdown-toggle::after {
  content: none !important;
  display: none !important;
}

.universal-layout-page .nav-label-compact { display: none; }

@media (min-width: 1181px) {
  .universal-layout-page .landing-header .landing-nav-links li > a,
  .universal-layout-page .landing-header .landing-nav-links .dropdown-toggle {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 42px;
    padding: 8px 10px !important;
    font-size: .82rem !important;
    line-height: 1.2 !important;
  }

  .universal-layout-page .nav-label-full { display: inline; }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .universal-layout-page .landing-header .landing-nav-links li > a,
  .universal-layout-page .landing-header .landing-nav-links .dropdown-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0 !important;
    font-size: 0 !important;
    line-height: 1 !important;
  }

  .universal-layout-page .nav-context-label { display: none !important; }
  .universal-layout-page .landing-nav-links .nav-context-icon {
    display: inline-flex !important;
    margin: 0 !important;
    font-size: 23px !important;
    transform: none !important;
  }
}

@media (max-width: 900px) {
  .universal-layout-page .landing-header .landing-nav {
    flex-wrap: wrap;
  }

  .universal-layout-page .landing-header .landing-nav-links,
  .universal-layout-page .landing-header .landing-nav-links.active,
  .universal-layout-page .landing-header .landing-nav-links.is-open {
    order: 5;
    position: static !important;
    display: none !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    flex: 0 0 100%;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 10px 0 0;
    padding: 12px 8px 10px;
    gap: 6px;
    overflow: visible !important;
    border-top: 1px solid var(--border-color);
    background: var(--landing-panel, var(--background-primary));
    box-shadow: none;
    transform: none !important;
  }

  .universal-layout-page .landing-header .landing-nav-links.active,
  .universal-layout-page .landing-header .landing-nav-links.is-open {
    display: grid !important;
  }

  .universal-layout-page .landing-header .landing-nav-links > li {
    position: static !important;
    min-width: 0;
    width: auto;
    margin: 0;
  }

  .universal-layout-page .landing-header .landing-nav-links li > a,
  .universal-layout-page .landing-header .landing-nav-links .dropdown-toggle {
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px;
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: 6px 2px !important;
    font-size: .63rem !important;
    line-height: 1.15 !important;
    text-align: center;
  }

  .universal-layout-page .landing-nav-links .nav-context-icon {
    display: inline-flex !important;
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1 !important;
    transform: none !important;
  }

  .universal-layout-page .nav-context-label,
  .universal-layout-page .nav-label-compact {
    display: block !important;
    min-width: 0;
    white-space: nowrap;
  }

  .universal-layout-page .nav-label-full,
  .universal-layout-page .landing-mobile-medugo {
    display: none !important;
  }

  .universal-layout-page .landing-nav-links .dropdown.open {
    grid-column: 1 / -1;
  }

  .universal-layout-page .landing-nav-links .dropdown.open > .dropdown-toggle {
    width: calc(20% - 5px);
    min-width: 58px;
    margin-left: auto;
  }

  .universal-layout-page .landing-nav-links .dropdown.open .dropdown-menu {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 8px 0 0 !important;
    padding: 8px !important;
    gap: 7px;
    overflow: visible !important;
    transform: none !important;
  }

  .universal-layout-page .landing-nav-links .dropdown.open .dropdown-menu a {
    min-height: 40px;
    padding: 8px 4px !important;
    font-size: .67rem !important;
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  .universal-layout-page .landing-header .landing-nav-links,
  .universal-layout-page .landing-header .landing-nav-links.active,
  .universal-layout-page .landing-header .landing-nav-links.is-open {
    padding-right: 2px;
    padding-left: 2px;
    gap: 2px;
  }

  .universal-layout-page .landing-header .landing-nav-links li > a,
  .universal-layout-page .landing-header .landing-nav-links .dropdown-toggle {
    font-size: .56rem !important;
  }
}

/* Compact mobile MeduGO control so the menu trigger stays on the first row. */
@media (max-width: 620px) {
  .universal-layout-page .landing-header .landing-nav { column-gap: 7px; }
  .universal-layout-page .landing-header .landing-actions { gap: 6px; min-width: 0; }
  .universal-layout-page .landing-header #medugo-nav-link.landing-medugo-btn { display:inline-flex!important;width:62px!important;min-width:62px!important;height:38px!important;padding:0 8px!important;gap:5px!important; }
  .universal-layout-page .landing-header #medugo-nav-link .medugo-wordmark { font-size:0!important; }
  .universal-layout-page .landing-header #medugo-nav-link .logo-go { font-size:.72rem!important; }
  .universal-layout-page .landing-header #medugo-nav-link .landing-controller-icon { display:inline-block!important;transform:scale(.82); }
  .universal-layout-page .landing-header .hamburger { flex:0 0 42px;margin-left:0!important; }
}
