:root {
    /* Brand Colors - Professional Blue Palette */
    --color-primary: #080629;           /* Dark navy - backgrounds, navbar, footer */
    --color-primary-light: #0d0a3d;     /* Dark navy light variant */
    --color-primary-dark: #040315;      /* Dark navy dark variant */
    
    /* Brand Blue Palette - Available for use */
    --color-brand-blue-bright: #4d8ee7; /* Bright blue - primary buttons, CTAs */
    --color-brand-blue-medium: #405cdb; /* Medium blue - button hover, accents */
    --color-brand-blue-light: #80abd5;  /* Light blue - secondary elements, highlights */
    
    /* Button Colors - Using recommended brand colors */
    --color-button: #4d8ee7;            /* Primary buttons */
    --color-button-hover: #405cdb;     /* Button hover state */
    
    /* Neutral Colors */
    --color-text: #2d3748;
    --color-text-light: #718096;
    --color-text-muted: #4a5568;
    --color-white: #ffffff;
    --color-bg: #f5f5f5;
    --color-bg-light: #f7fafc;
    --color-border: #e2e8f0;
    --color-border-light: #cbd5e0;
    
    /* Status Colors */
    --color-success: #c6f6d5;
    --color-success-text: #22543d;
    --color-success-border: #9ae6b4;
    --color-error: #fed7d7;
    --color-error-text: #c53030;
    --color-error-border: #e53e3e;
    --color-info: #ebf8ff;
    --color-info-text: #080629;
    --color-info-border: #080629;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--color-bg-light);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth transitions for interactive elements */
* {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.3s ease,
                border-color 0.3s ease;
}

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--color-brand-blue-bright);
    outline-offset: 2px;
}

/* Accessibility - Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--color-brand-blue-bright);
    outline-offset: 2px;
    border-radius: 4px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--color-brand-blue-bright);
    outline-offset: 2px;
    border-radius: 4px;
}

main {
    flex: 1;
}

/* Common Components - Navbar/Header */
.navbar, .header {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0 32px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand, .header h1, .header a {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--color-white);
    margin: 0;
}

.navbar-actions, .header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-item {
    padding: 14px 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text);
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.user-menu-item:last-child {
    border-bottom: none;
}

.user-menu-item:hover {
    background: var(--color-bg-light);
    padding-left: 24px;
}

.user-menu-item.danger {
    color: #e53e3e;
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background: var(--color-button);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(77, 142, 231, 0.3);
}

.btn-primary:hover {
    background: var(--color-button-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 142, 231, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(77, 142, 231, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--color-text);
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn:disabled {
    opacity: 0.8; /* Less grey, more visible */
    cursor: not-allowed;
    position: relative;
}

/* Make loading spinner more visible when button is disabled */
.btn:disabled .loading {
    opacity: 1 !important;
    border-top-color: #0047AB;
    border-color: rgba(0, 71, 171, 0.3);
    width: 18px;
    height: 18px;
}

/* Full-width button variant */
.btn[type="submit"],
.btn.full-width {
    width: 100%;
    padding: 12px 24px;
    font-size: 14px;
}

/* Utility Classes for Common Patterns */
.hero-cta {
    margin-top: 32px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-align: center;
}

.section-subtitle {
    font-size: 24px;
    font-weight: 400;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-overlay .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
    font-weight: 600;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #0047AB;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #2c5aa0;
}

.btn-submit:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.btn-upgrade {
    background: var(--color-button);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.btn-upgrade:hover {
    background: var(--color-button-hover);
}

.btn-upgrade.secondary {
    background: #e2e8f0;
    color: var(--color-text);
}

.btn-upgrade.secondary:hover {
    background: #cbd5e0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Status Messages */
.status {
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 15px;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
}

.status.info {
    background: var(--color-info);
    color: var(--color-primary);
    border-left: 4px solid var(--color-brand-blue-bright);
    border-color: rgba(77, 142, 231, 0.2);
}

.status.error {
    background: var(--color-error);
    color: var(--color-error-text);
    border-left: 4px solid var(--color-error-border);
    border-color: rgba(229, 62, 62, 0.2);
}

.status.success {
    background: var(--color-success);
    color: var(--color-success-text);
    border-left: 4px solid #38a169;
}

/* Forms */
.form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 16px;
}

/* Form container for app/dashboard pages */
.form-container:not(.login-form) {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-border);
}

/* Form container inside login/signup cards should be transparent */
.login-card .form-container,
.signup-card .form-container {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
    max-width: 100%;
}

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

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--color-text);
    font-size: 15px;
    letter-spacing: -0.2px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    color: var(--color-text);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-brand-blue-bright);
    box-shadow: 0 0 0 4px rgba(77, 142, 231, 0.15);
    transform: translateY(-1px);
}

input:hover:not(:disabled),
textarea:hover:not(:disabled) {
    border-color: var(--color-brand-blue-light);
}

textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

input:disabled {
    background: var(--color-bg-light);
    color: var(--color-text-light);
    cursor: not-allowed;
}

.login-card label,
.signup-card label {
    color: var(--color-text);
    font-weight: 500;
}

.login-card input,
.signup-card input {
    background: white;
    border-color: var(--color-border);
    color: var(--color-text);
}

.login-card input:focus,
.signup-card input:focus {
    border-color: var(--color-brand-blue-bright);
    background: white;
    box-shadow: 0 0 0 3px rgba(77, 142, 231, 0.15);
}

.login-card .form-hint,
.signup-card .form-hint,
.login-card .email-hint,
.signup-card .email-hint {
    color: var(--color-text-muted);
}

.login-card .btn,
.signup-card .btn,
.login-card .btn-submit,
.signup-card .btn-submit {
    background: var(--color-button);
    color: white;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
}

.login-card .btn:hover,
.signup-card .btn:hover,
.login-card .btn-submit:hover,
.signup-card .btn-submit:hover {
    background: var(--color-button-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 142, 231, 0.3);
}

.form-hint,
.password-hint,
.email-hint,
.help-text {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* Landing Page Styles */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-white);
    padding: 120px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(77, 142, 231, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 28px;
    line-height: 1.15;
    letter-spacing: -1px;
}

.hero p {
    font-size: 22px;
    margin-bottom: 36px;
    opacity: 0.95;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.hero .btn {
    padding: 16px 40px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 10px;
}

/* Features Section */
.features {
    padding: 80px 24px;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--color-text-light);
    margin-bottom: 64px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 56px;
}

.feature-card {
    padding: 40px 32px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-brand-blue-bright), var(--color-brand-blue-medium));
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(77, 142, 231, 0.1);
    border-color: var(--color-brand-blue-light);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

/* Feature icons removed - using SVG icons inline instead */

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-primary);
}

.feature-card p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    padding: 100px 32px;
    background: var(--color-bg-light);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 36px;
    margin-top: 56px;
}

.step {
    text-align: center;
    padding: 40px 32px;
    background: white;
    border-radius: 16px;
    border: 2px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--color-brand-blue-light);
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-brand-blue-bright) 0%, var(--color-brand-blue-medium) 100%);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 4px 16px rgba(77, 142, 231, 0.3);
}

.step h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-primary);
    letter-spacing: -0.3px;
}

.step p {
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
}

/* CTA Section */
.cta-section {
    padding: 100px 32px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(77, 142, 231, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.cta-section h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.cta-section p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* Login/Signup Pages */
.login-card,
.signup-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
    padding: 48px;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    color: var(--color-text);
}

.signup-card {
    max-width: 440px;
}

.login-card h2,
.signup-card h2 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.signup-card h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 30px;
    font-size: 15px;
}

.signup-card .subtitle {
    margin-bottom: 32px;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab.active {
    color: var(--color-white);
    border-bottom-color: var(--color-brand-blue-bright);
    font-weight: 600;
}

.tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.login-card .tabs,
.signup-card .tabs {
    border-bottom-color: var(--color-border);
}

.login-card .tab,
.signup-card .tab {
    color: var(--color-text-muted);
}

.login-card .tab.active,
.signup-card .tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-brand-blue-bright);
}

.login-card .tab:hover,
.signup-card .tab:hover {
    color: var(--color-primary);
}

.form-container.login-form {
    display: none;
}

.form-container.login-form.active {
    display: block;
}

.login-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #718096;
}

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

.login-link a:hover {
    text-decoration: underline;
}

/* App Page - Main Container (ChatGPT-style: sidebar + content) */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    flex-direction: row;
}

/* Sidebar - ChatGPT-style conversation list */
.sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--color-bg-light);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid var(--color-border);
    background: white;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: -0.2px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
}

.memo-item {
    padding: 12px 14px;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border: 1px solid transparent;
    background: white;
}

.memo-item:hover {
    background: #f0f4f8;
    border-color: var(--color-border);
}

.memo-item.active {
    background: rgba(77, 142, 231, 0.12);
    border-color: var(--color-brand-blue-bright);
}

.memo-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
}

.memo-item-preview {
    font-size: 12px;
    color: var(--color-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.memo-item-date {
    font-size: 11px;
    color: #a0aec0;
    margin-top: 4px;
}

.sidebar-empty {
    padding: 32px 16px;
    text-align: center;
    color: #a0aec0;
    font-size: 14px;
    line-height: 1.5;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: var(--color-bg-light);
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
    -webkit-overflow-scrolling: touch;
}

/* Memo Result */
.memo-result {
    margin-top: 40px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.memo-result-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 24px 32px;
    border-bottom: 2px solid var(--color-border);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
}

.memo-result-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.3px;
}

.memo-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.memo-content {
    padding: 40px;
    line-height: 1.8;
    color: var(--color-text);
    font-family: 'Georgia', 'Times New Roman', serif;
    background: white;
}

/* Markdown styling */
.memo-content h1, .memo-content h2, .memo-content h3 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--color-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.memo-content h1 {
    font-size: 28px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.memo-content h2 {
    font-size: 22px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.memo-content h3 {
    font-size: 18px;
}

.memo-content p {
    margin-bottom: 16px;
}

.memo-content ul, .memo-content ol {
    margin-bottom: 16px;
    padding-left: 30px;
}

.memo-content li {
    margin-bottom: 8px;
}

.memo-content code {
    background: var(--color-bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e53e3e;
}

.memo-content pre {
    background: var(--color-bg-light);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
}

.memo-content pre code {
    background: none;
    padding: 0;
    color: var(--color-text);
}

.memo-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 16px;
    margin-left: 0;
    color: #4a5568;
    font-style: italic;
}

.memo-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.memo-content th, .memo-content td {
    border: 1px solid var(--color-border);
    padding: 12px;
    text-align: left;
}

.memo-content th {
    background: var(--color-bg-light);
    font-weight: 600;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px rgba(0,0,0,0.15);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: var(--color-bg-light);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Settings Modal */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 20px;
    background: var(--color-bg-light);
}

.settings-tab {
    padding: 16px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-light);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
    top: 1px;
}

.settings-tab:hover {
    color: var(--color-text);
    background: white;
}

.settings-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-button);
    background: white;
}

.settings-content {
    flex: 1;
    padding: 40px 48px;
    min-height: 400px;
    background: var(--color-bg-light);
    overflow-y: auto;
}

.settings-section {
    display: none;
    max-width: 560px;
}

.settings-section.active {
    display: block;
}

.settings-section h3,
.settings-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.settings-section h3 {
    font-size: 20px;
}

.settings-section p {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

.settings-field {
    margin-bottom: 24px;
}

.settings-field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--color-text);
    font-size: 15px;
    letter-spacing: -0.2px;
}

.settings-field input[type="text"],
.settings-field input[type="email"],
.settings-field input[type="password"] {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-field input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(51, 43, 117, 0.1);
}

.subscription-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    background: white;
    max-width: 600px;
}

.subscription-card h4,
.subscription-card h5 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.subscription-card h5 {
    font-size: 16px;
}

.subscription-card p {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.subscription-features {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.subscription-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.subscription-features li:before {
    content: "✓";
    color: #38a169;
    font-weight: bold;
}

.subscription-price {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 16px 0;
}

.subscription-card .subscription-price {
    font-size: 32px;
}

/* Settings Page */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
}

.page-header {
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.page-header p {
    font-size: 16px;
    color: var(--color-text-light);
    line-height: 1.6;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.settings-container {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    min-height: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.settings-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-right: 1px solid var(--color-border);
    padding: 32px 0;
}

.settings-nav-item {
    padding: 16px 28px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    margin: 4px 0;
}

.settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 32px;
}

.settings-nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: var(--color-brand-blue-bright);
    font-weight: 600;
}

/* Content Pages (About, Privacy, Terms) */
.page-header.gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 80px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header.gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(77, 142, 231, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.page-header.gradient h1 {
    color: white;
    position: relative;
    z-index: 1;
}

.page-header.gradient p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 20px;
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

.content-section {
    margin-bottom: 48px;
}

.content-section h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 20px;
    margin-top: 48px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.content-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 32px;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.content-section p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--color-text);
}

.content-section ul, .content-section ol {
    margin-left: 24px;
    margin-bottom: 16px;
    color: #4a5568;
}

.content-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.last-updated {
    color: #718096;
    font-size: 14px;
    font-style: italic;
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.stat-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    border: 2px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--color-brand-blue-light);
}

.stat-card .number {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.stat-card .label {
    font-size: 14px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-section {
    background: #f7fafc;
    padding: 40px 24px;
    margin: 40px 0;
    border-radius: 8px;
}

/* Footer */
.footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 32px 32px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(77, 142, 231, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 80px;
    position: relative;
    z-index: 1;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    flex: 1;
}

.footer-section h4 {
    color: var(--color-white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--color-brand-blue-bright);
    transition: color 0.2s;
}

/* Pricing card CTA – readable on light cards */
.pricing-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    min-height: 44px;
    line-height: 1.2;
}

.pricing-card .pricing-card-cta:not(.btn-primary):hover {
    background: var(--color-primary) !important;
    color: white !important;
}

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
    margin: 0;
}

/* Responsive Design */
/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Hero Section */
    .hero {
        padding: 60px 24px !important;
        background-attachment: scroll !important;
    }

    .hero h1 {
        font-size: 36px;
        line-height: 1.2;
    }

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

    .hero-cta {
        flex-direction: column;
        gap: 16px;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }

    /* Navbar / Header */
    .navbar,
    .header {
        padding: 0 16px;
        height: 64px;
        min-height: 64px;
    }

    .navbar-brand img,
    .header img[alt="Acquittify"] {
        height: 40px !important;
    }

    .header-actions {
        gap: 8px;
    }

    .user-menu-btn {
        padding: 8px 12px;
        font-size: 14px;
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar-actions {
        gap: 8px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    /* Typography */
    .section-title {
        font-size: 32px;
    }

    .section-subtitle {
        font-size: 20px;
    }

    /* Why Acquittify Split Layout */
    section.features > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }

    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:first-child {
        padding: 60px 32px !important;
    }

    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:first-child h2 {
        font-size: 36px !important;
    }

    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:first-child h3 {
        font-size: 22px !important;
    }

    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:first-child p {
        font-size: 18px !important;
    }

    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:last-child {
        padding: 60px 32px !important;
        gap: 32px !important;
    }

    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:last-child > div {
        flex-direction: column !important;
        gap: 16px !important;
    }

    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:last-child > div > div:first-child {
        width: 100% !important;
        height: 4px !important;
    }

    /* What's Inside Grid */
    #whats-inside-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* All 3-column grids */
    section.features > div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* Pricing Grid */
    #pricing-grid,
    #pricingGrid,
    div[id*="pricing"],
    .features-grid[id*="pricing"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        display: grid !important;
    }

    /* Component-specific responsive styles */
    .pricing-card,
    .subscription-card,
    .feature-card {
        margin-bottom: 24px;
        padding: 24px !important;
        transform: none !important;
    }

    .subscription-card h3 {
        font-size: 20px !important;
    }

    .subscription-price span {
        font-size: 36px !important;
    }

    .feature-card {
        padding: 32px 24px !important;
    }

    .feature-card h4 {
        font-size: 20px !important;
    }

    .feature-card p {
        font-size: 15px !important;
    }

    /* Timeline component */
    .timeline-item {
        padding-left: 40px !important;
    }

    .timeline-item::before {
        left: 0 !important;
        width: 20px !important;
        height: 20px !important;
    }

    /* Output cards in What Acquittify Can Do */
    .output-card {
        padding: 24px !important;
    }

    .output-card h3 {
        font-size: 18px !important;
    }

    .output-card p {
        font-size: 15px !important;
    }

    /* Sections */
    section.features,
    section.how-it-works,
    section#how-it-works {
        padding: 60px 24px !important;
    }

    /* How It Works – horizontal timeline stacks on mobile */
    #how-it-works-timeline > div {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 24px !important;
        max-width: 100% !important;
    }

    #how-it-works-timeline > div > div:first-child {
        display: none !important; /* hide horizontal connector */
    }

    #how-it-works-timeline > div > div {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0 !important;
    }

    #how-it-works-timeline > div > div > div {
        padding: 28px 24px !important;
        border-radius: 16px !important;
    }

    #how-it-works-timeline > div > div > div > div:first-child {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        min-height: 56px !important;
        margin-bottom: 20px !important;
    }

    #how-it-works-timeline h3 {
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }

    #how-it-works-timeline p {
        font-size: 15px !important;
        line-height: 1.65 !important;
    }

    #how-it-works h2 {
        font-size: 36px !important;
        margin-bottom: 12px !important;
    }

    #how-it-works h3 {
        font-size: 20px !important;
    }

    #how-it-works .container > div[style*="margin-bottom: 80px"] {
        margin-bottom: 48px !important;
    }

    /* Page Headers */
    .page-header {
        padding: 60px 24px !important;
    }

    .page-header h1 {
        font-size: 36px;
    }

    .page-header p {
        font-size: 18px;
    }

    /* App: sidebar + content stack on tablet/mobile */
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 35vh;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .sidebar-header {
        padding: 14px 16px;
    }

    .sidebar-header h2 {
        font-size: 15px;
    }

    .content {
        padding: 24px 20px;
    }

    .memo-result-header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 20px 24px;
    }

    .memo-result-header h2 {
        width: 100%;
        font-size: 20px;
    }

    .memo-result-header .feedback-buttons {
        flex-wrap: wrap;
    }

    .memo-content {
        padding: 20px 24px;
    }

    /* Settings: stack sidebar nav and content */
    .settings-container {
        flex-direction: column;
        min-height: auto;
    }

    .settings-sidebar {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    }

    .settings-nav-item {
        padding: 12px 16px;
        border-radius: 8px;
        white-space: nowrap;
        border-left: none;
        border-bottom: none;
        font-size: 14px;
    }

    .settings-nav-item.active {
        background: rgba(255, 255, 255, 0.25);
        border-bottom: none;
    }

    .settings-content {
        padding: 24px 20px;
    }

    .settings-section h3 {
        font-size: 20px;
    }

    .main-content {
        padding: 24px 16px;
    }

    /* Content Sections */
    .content-section h2 {
        font-size: 28px;
    }

    .content-section h3 {
        font-size: 20px;
    }

    /* Built for Federal Defense Timeline */
    section.how-it-works .container {
        max-width: 100% !important;
    }

    /* What Acquittify Can Do Section */
    #what-acquittify-can-do .container {
        max-width: 100% !important;
        padding: 0 16px !important;
    }

    #what-acquittify-can-do h2 {
        font-size: 36px !important;
    }

    #what-acquittify-can-do .output-card {
        padding: 32px 24px !important;
    }

    /* In the Courtroom Section */
    #in-the-courtroom {
        padding: 60px 24px !important;
    }

    #in-the-courtroom h2 {
        font-size: 36px !important;
    }

    /* Proven Performance */
    #proven-performance {
        padding: 60px 24px !important;
    }

    #proven-performance h2 {
        font-size: 36px !important;
    }

    /* Get Started CTA */
    #get-started {
        padding: 60px 24px !important;
    }

    #get-started h2 {
        font-size: 36px !important;
    }

    #get-started > div > div {
        flex-direction: column !important;
        gap: 16px !important;
    }

    #get-started .btn {
        width: 100%;
        padding: 16px 24px !important;
    }

    /* Footer – mobile layout */
    .footer {
        padding: 40px 24px 24px !important;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 36px;
    }

    .footer-logo img {
        height: 64px !important;
    }

    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 32px;
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
    }

    .footer-section {
        text-align: left;
    }

    .footer-section h4 {
        margin-bottom: 10px;
        font-size: 13px;
    }

    .footer-section a {
        padding: 6px 0;
        min-height: 36px;
        display: flex;
        align-items: center;
        font-size: 14px;
    }

    .footer-bottom {
        margin-top: 28px;
        padding-top: 20px;
        font-size: 13px;
    }

    /* FAQ */
    .questions-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .faq-question {
        padding: 20px 24px !important;
        font-size: 17px !important;
    }

    .faq-answer > div {
        padding: 0 24px 20px !important;
        font-size: 16px !important;
    }

    /* Flex layouts */
    section.features > div[style*="display: flex"][style*="justify-content: space-between"] {
        flex-direction: column !important;
        gap: 32px !important;
    }

    section.features > div[style*="display: flex"][style*="justify-content: space-between"] > div {
        margin-top: 0 !important;
    }

    /* Container padding */
    .container {
        padding: 0 16px !important;
    }

    /* Buttons in sections */
    section .btn {
        width: 100%;
        max-width: 100%;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

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

    .section-title {
        font-size: 28px;
    }

    .navbar {
        padding: 0 12px;
    }

    .navbar-brand img {
        height: 32px !important;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    section.features,
    section.how-it-works,
    section#how-it-works {
        padding: 40px 16px !important;
    }

    /* How It Works timeline – tighter on small phones */
    #how-it-works-timeline > div {
        gap: 20px !important;
    }

    #how-it-works-timeline > div > div > div {
        padding: 20px 18px !important;
        border-radius: 12px !important;
    }

    #how-it-works-timeline > div > div > div > div:first-child {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        margin-bottom: 16px !important;
    }

    #how-it-works-timeline h3 {
        font-size: 18px !important;
    }

    #how-it-works-timeline p {
        font-size: 14px !important;
    }

    #how-it-works h2 {
        font-size: 28px !important;
    }

    #how-it-works h3 {
        font-size: 17px !important;
    }

    #how-it-works .how-it-works-header {
        margin-bottom: 32px !important;
    }

    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:first-child,
    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:last-child {
        padding: 40px 24px !important;
    }

    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:first-child h2 {
        font-size: 28px !important;
    }

    section.features > div[style*="grid-template-columns: 1fr 1fr"] > div:first-child h3 {
        font-size: 20px !important;
    }

    .page-header {
        padding: 40px 16px !important;
    }

    .page-header h1 {
        font-size: 28px;
    }

    /* Footer – single column on small phones */
    .footer {
        padding: 32px 20px 20px !important;
    }

    .footer-content {
        gap: 28px;
    }

    .footer-logo img {
        height: 56px !important;
    }

    .footer-columns {
        grid-template-columns: 1fr !important;
        gap: 24px;
        max-width: 100%;
    }

    .footer-section {
        text-align: center;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-section:last-child {
        border-bottom: none;
    }

    .footer-section h4 {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .footer-section a {
        min-height: 40px;
        justify-content: center;
        font-size: 14px;
    }

    .footer-bottom {
        margin-top: 24px;
        padding-top: 16px;
        font-size: 12px;
    }

    /* Pricing – ensure Custom pricing and Contact Us are readable */
    #pricingGrid .subscription-price span {
        font-size: 28px !important;
        font-weight: 700;
        color: var(--color-primary);
    }

    #pricingGrid .pricing-card-cta {
        font-size: 15px;
        padding: 12px 20px;
    }

    #what-acquittify-can-do h2,
    #in-the-courtroom h2,
    #proven-performance h2,
    #get-started h2 {
        font-size: 28px !important;
    }

    .faq-question {
        padding: 16px 20px !important;
        font-size: 16px !important;
    }

    .faq-question:hover {
        background: #f7fafc !important;
    }

    .faq-item.active .faq-question {
        background: #f7fafc !important;
    }

    .faq-item.active .faq-icon {
        transform: rotate(45deg) !important;
    }

    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 32vh;
    }

    .content {
        padding: 20px 16px;
    }

    .memo-result-header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 20px;
    }

    .memo-result-header h2 {
        font-size: 18px;
    }

    .memo-content {
        padding: 20px 16px;
        font-size: 15px;
    }

    .header img[alt="Acquittify"] {
        height: 40px !important;
    }

    .form-container .form-group textarea,
    .form-container .form-group input {
        font-size: 16px; /* prevents zoom on focus on iOS */
    }

    .settings-content {
        padding: 20px 16px;
    }

    .settings-section h3 {
        font-size: 18px;
    }

    .settings-field {
        margin-bottom: 20px;
    }

    .settings-field input {
        font-size: 16px;
    }

    .subscription-card {
        padding: 20px !important;
    }

    .settings-container {
        flex-direction: column;
    }

    .settings-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 0;
    }

    .settings-nav-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .settings-nav-item.active {
        border-left: none;
        border-bottom-color: #0047AB;
    }
}
