 @font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: url('fonts/NotoSans-Regular.ttf') format('truetype'); font-display: swap; }
        @font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 500; src: url('fonts/NotoSans-Medium.ttf') format('truetype'); font-display: swap; }
        @font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 700; src: url('fonts/NotoSans-Bold.ttf') format('truetype'); font-display: swap; }

        :root {
            --font-main: 'Noto Sans', sans-serif;
            --color-bg: #ffffff;
            --color-text: #000000;
            --color-primary: #2563eb;
            --color-primary-dark: #1e40af;
            --color-border: #e5e7eb;
            --color-subtle: #6b7280;
            --focus-ring: 3px solid #000000;
            --focus-offset: 2px;
            --container-width: 1200px;
            --radius-md: 8px;
            --color-error: #c00; 
            --color-error-bg: #fff0f0; 
            --color-success: #008000;
            --color-success-bg: #f0fff0;
        }

        *:focus-visible { outline: var(--focus-ring) !important; outline-offset: var(--focus-offset) !important; border-radius: 2px; }
        input[aria-invalid="true"] { border-color: var(--color-error); border-width: 2px; }
        body, h1, h2, h3, p, ul, li { margin: 0; padding: 0; }
        
        body { font-family: var(--font-main); background-color: var(--color-bg); color: var(--color-text); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
        
        /* Utility to hide "Search questions" label visually */
        .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
        
        .skip-link { position: absolute; top: -500px; left: 0; background: var(--color-primary); color: white; padding: 1rem; z-index: 999; }
        .skip-link:focus { top: 0; }

        .container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }
        
        /* Header & Nav */
        .site-header { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 1000; background-color: var(--color-bg); }
        .header-inner { display: flex; justify-content: space-between; align-items: center; position: relative; flex-wrap: wrap; }
        .logo { font-weight: 700; font-size: 1.5rem; text-decoration: none; color: #272727ff; }
        .logo-highlight { color: var(--color-primary); }
        .main-nav ul { display: flex; gap: 1.5rem; list-style: none; }
        .main-nav a { text-decoration: underline; color: var(--color-text); font-weight: 500; font-size: 1.1rem; }
        .main-nav a:hover { text-decoration: none; }
        
        /* Mobile Toggle */
        .mobile-nav-toggle { display: none; background: transparent; border: 0; padding: 0.5rem; cursor: pointer; }
        .mobile-nav-toggle-icon { display: block; width: 28px; height: 3px; background: var(--color-text); border-radius: 2px; position: relative; }
        .mobile-nav-toggle-icon::before, .mobile-nav-toggle-icon::after { content: ''; position: absolute; left: 0; width: 100%; height: 3px; background: var(--color-text); border-radius: 2px; transition: transform 0.3s ease; }
        .mobile-nav-toggle-icon::before { transform: translateY(-8px); }
        .mobile-nav-toggle-icon::after { transform: translateY(8px); }
        
        /* Menu Toggle Animation */
        .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon { background: transparent; }
        .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon::before { transform: rotate(45deg); }
        .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon::after { transform: rotate(-45deg); }

        .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; font-weight: 500; border-radius: var(--radius-md); text-decoration: none; cursor: pointer; border: 2px solid transparent; min-height: 44px; box-sizing: border-box; }
        .btn-primary { background: var(--color-primary); color: white; }
        .btn-primary:hover { background: var(--color-primary-dark); }

        /* Layout */
        .main-layout { display: grid; grid-template-columns: 1fr 3fr; gap: 3rem; margin-top: 2.5rem; margin-bottom: 3rem; flex-grow: 1; }
        .theme-5 .sidebar { order: -1; }
        #main-content { scroll-margin-top: 6rem; }

        /* Sidebar Elements */
        .search-form-container { margin: 1.5rem 0; }
        .search-form { display: flex; flex-direction: column; gap: 1rem; }
        .search-form input[type="search"] { width: 100%; padding: 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); min-height: 44px; box-sizing: border-box; }
        .search-form .btn { width: 100%; }

        /* Card & Typography */
        .q-card { border: 1px solid var(--color-border); padding: 1.5rem; border-radius: var(--radius-md); }
        .registration-container { margin: 0 auto; padding: 2rem; }
        
        /* Form Title */
        .registration-container h2 { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 2.5rem; }

        /* Links */
        .back-link { color: #000000; text-decoration: underline; font-weight: 500; }
        .back-link:hover { text-decoration: none; }

        .form-group { display: flex; flex-direction: column; margin-bottom: 1.25rem; }
        .form-group label { font-weight: 500; margin-bottom: 0.5rem; color: var(--color-text); font-size: 1.1rem; }
        .form-group input { width: 100%; padding: 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); min-height: 44px; box-sizing: border-box; font-family: var(--font-main); font-size: 1.1rem; }
        
        .form-error-summary { border: 2px solid var(--color-error); background: var(--color-error-bg); color: var(--color-error); padding: 1rem; border-radius: var(--radius-md); font-weight: 500; margin-bottom: 1.5rem; }
        .form-success-summary { border: 2px solid var(--color-success); background: var(--color-success-bg); color: var(--color-success); padding: 1rem; border-radius: var(--radius-md); font-weight: 500; margin-bottom: 1.5rem; }
        
        /* Footer */
        .site-footer { background: #1a1a1a; color: white; padding: 2rem 0; font-size: 1rem; }
        .footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
        .footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 0; margin: 0; }
        .footer-nav a { color: white; text-decoration: underline; }
        .footer-nav a:hover { text-decoration: none; }
        .footer-copy { margin: 0; text-align: right; }

        /* Mobile */
        @media (min-width: 768px) { .main-nav { position: absolute; left: 50%; transform: translateX(-50%); } }
        
        @media (max-width: 768px) {
            .site-header { padding: 0.5rem 0; }
            
            /* --- MATCHING LOGIN.PHP CONTAINER WIDTH (90%) --- */
            .container { padding: 0 1rem; width: 90%; }
            
            .header-inner { flex-direction: row; }
            .mobile-nav-toggle { display: block; }
            .main-nav, .header-actions { display: none; width: 100%; }
            .main-nav[data-visible="true"], .header-actions[data-visible="true"] { display: block; }
            .main-nav { order: 2; margin-top: 1.5rem; position: static; transform: none; }
            .header-actions { order: 3; margin-top: 1.5rem; }
            .main-nav ul { flex-direction: column; gap: 1rem; text-align: center; }
            .header-actions .btn { width: 100%; }
            .main-layout { margin-top: 1.5rem; gap: 1.5rem; grid-template-columns: 1fr; }
            .theme-5 .sidebar { order: unset; }
            .footer-inner { flex-direction: column; align-items: center; gap: 1.5rem; }
            .footer-nav ul { justify-content: center; gap: 1rem 1.5rem; }
            .footer-copy { text-align: center; }
            
            /* --- RESIZE HEADER ELEMENTS ON MOBILE --- */
            .logo { font-size: 1.3rem; }
            .btn { padding: 0.6rem 1rem; font-size: 0.9rem; min-height: 38px; }
            
            /* Ensure inputs and buttons fill the card */
            .form-group input, 
            form .btn-primary { 
                width: 100% !important; 
            }

            /* --- REDUCED PADDING/SPACING FOR MOBILE FORM --- */
            .registration-container {
                padding: 1.25rem; /* Reduced from default 2rem */
            }
            .form-group {
                margin-bottom: 0.85rem; /* Reduced from 1.25rem */
            }
            .form-group input {
                padding: 0.6rem; /* Slightly tighter internal padding */
            }
            .registration-container h2 {
                margin-bottom: 1.5rem; /* Reduced from 2.5rem */
            }
            /* Reduce space under generic text */
            .registration-container p {
                margin-bottom: 1rem; 
            }
        }