* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ===== Parkinson Canada Brand Tokens ===== */
    /* Brand colours */
    --pc-navy: #263b7f; /* Primary brand color - use for headings */
    --pc-blue: #263b7f; /* Alias for pc-navy */
    --pc-blue-light: #5a7bb5; /* Lighter blue for headers and dialogs */
    --pc-mint: #cce9e4;
    --pc-coral: #e25744;
    --pc-white: #ffffff;
    
    /* Interactive States */
    --pc-blue-hover: #1a2958;
    --pc-blue-light-hover: #4a6ba5; /* Hover state for light blue */
    
    /* Neutrals */
    --ink: #111318;
    --ink-2: #2a2f3a;
    --muted: #5d6677;
    
    /* Borders */
    --border: rgba(17, 19, 24, 0.12);
    --border-strong: rgba(17, 19, 24, 0.16);
    
    /* Surfaces (Calm theme - Theme A) */
    --bg: #ffffff; /* White background */
    --surface: #fafafa; /* Very light gray for card backgrounds - provides contrast against white bg */
    --surface-2: #f2f7f7;
    
    /* Spacing Scale (8px grid system) */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.5rem;   /* 24px */
    --space-6: 2rem;     /* 32px */
    
    /* Enhanced Accessibility Radii */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px; /* Increased for a softer, calmer feel */
    
    /* Shadows - Soft navy shadows for calm, grounded tone */
    --shadow-sm: 0 2px 8px rgba(38, 59, 127, 0.08); /* Increased opacity for better card definition */
    --shadow-md: 0 8px 24px rgba(38, 59, 127, 0.08); /* Increased opacity for better card definition */
    --shadow-vibrant: 0 12px 30px rgba(38, 59, 127, 0.12);
    
    /* Focus ring - Higher contrast for accessibility */
    --ring: 0 0 0 4px rgba(38, 59, 127, 0.18);
    --ring-accessible: 0 0 0 4px rgba(38, 59, 127, 0.4); /* Higher contrast focus ring */
    
    /* Typography */
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ls-tight: -0.01em; /* Slightly tighter tracking for headlines */
    --ls-tighter: -0.02em;
    
    /* Derived colors for UI components */
    --primary: var(--pc-navy);
    --accent: var(--pc-navy);
    --accent-2: var(--pc-mint);
    --focus: var(--pc-navy);
    --text: var(--ink);
    --text-secondary: var(--ink-2);
    --text-muted: var(--muted);
    --bg-card: var(--surface);
    --bg-section: var(--surface-2);
    
    /* Domain colors - desaturated by ~30% for calm, grounded tone */
    --domain-move: #5a8f5a;      /* Desaturated from #2e7d32 */
    --domain-recharge: #6b9f8a;  /* Desaturated from #4f8f7a */
    --domain-connect: #8b7fc9;   /* Desaturated from #6b5fc6 */
    --domain-medical: #d97a75;   /* Desaturated from #d9534f */
    --domain-adapt: #f0b870;      /* Desaturated from #f0ad4e */
}

/* Import Inter from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: var(--font-body);
    font-size: 16px; /* Base body text - 16px */
    font-weight: 400; /* Regular weight */
    line-height: 1.6; /* Calm, generous spacing */
    color: var(--text);
    background: var(--bg);
    letter-spacing: -0.01em; /* Slight negative tracking for Inter */
}

/* Typography System: 3 sizes (22px, 16px, 13px) and 3 weights (400, 500, 600) */
/* Hierarchy created through spacing, not size */

/* ===== Typography System - Consistent Across All Pages ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display) !important; /* Force Inter font */
    color: var(--pc-navy) !important; /* Use navy for headings - calm, grounded tone */
    margin: 0;
    letter-spacing: 0.01em; /* Slightly increased for softer feel */
    line-height: 1.5; /* Increased for more breathing room */
}

h1 {
    font-size: 32px !important; /* Consistent across all pages */
    font-weight: 600 !important; /* Semi-bold for softer feel */
    margin-bottom: var(--space-5); /* 24px spacing */
}

h2 {
    font-size: 26px !important; /* Consistent across all pages */
    font-weight: 600 !important; /* Semi-bold for softer feel */
    margin-bottom: var(--space-5); /* 24px spacing */
}

h3 {
    font-size: 18px !important; /* Consistent size - increased from 16px */
    font-weight: 500 !important; /* Medium weight */
    margin-bottom: var(--space-4); /* 16px spacing */
    color: var(--pc-navy) !important; /* Use navy for consistency */
}

h4 {
    font-size: 16px !important; /* Consistent size */
    font-weight: 500 !important; /* Medium weight */
    margin-bottom: var(--space-3); /* 12px spacing */
    color: var(--pc-navy) !important; /* Use navy for consistency */
}

h5, h6 {
    font-size: 14px !important; /* Minimum for accessibility */
    font-weight: 500 !important; /* Medium weight */
    margin-bottom: var(--space-2); /* 8px spacing */
    color: var(--pc-navy) !important; /* Use navy for consistency */
}

/* Page-level headings */
h2.page-title {
    font-size: 26px; /* Updated to match h2 hierarchy */
    font-weight: 600; /* Semi-bold for softer feel */
    margin-bottom: 1.5rem;
    color: var(--ink-2); /* Softer color */
}

h3.section-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.container {
    max-width: 1100px; /* 1100-1200px per design guide */
    margin: 0 auto;
    padding: 0 24px; /* Increased padding for more breathing room */
}

/* Article and module screens use standard container width */
.article-screen,
.learn-module-screen {
    max-width: 1100px;
    margin: 0 auto;
}

.navbar {
    background: var(--pc-blue);
    color: var(--pc-white);
    padding: 18px 0; /* Increased for more breathing room */
    margin-bottom: 24px; /* 8px grid: 24px */
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem; /* Increased gap for more spacing */
}

.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 40px; /* Increased from 36px */
    padding-right: 1rem; /* Add spacing between logo and nav links */
    gap: 0.75rem; /* Space between icon and wordmark */
}

.navbar-logo img {
    height: 40px; /* Increased from 36px */
    width: auto;
    display: block;
}

.navbar-logo .logo-header {
    display: block;
}

.navbar-logo .logo-icon {
    display: none;
}

.logo-wordmark {
    font-family: "Filson Pro", "FilsonPro", "Avenir Next", Avenir, Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 1.75rem; /* 28px - scaled down from 64px to fit header */
    letter-spacing: -0.5px;
    color: var(--pc-white);
    line-height: 1;
    display: block;
}

/* Switch to icon on small screens */
@media (max-width: 520px) {
    .navbar-logo .logo-header {
        display: none;
    }
    
    .navbar-logo .logo-icon {
        display: block;
    }
    
    .navbar-logo .logo-wordmark {
        display: none; /* Hide wordmark on mobile */
    }
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    color: var(--pc-white);
    text-decoration: none;
    padding: 8px 14px; /* 8px grid */
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-size: 14px; /* Increased from 13px - minimum for accessibility */
    font-weight: 500; /* Medium weight */
    min-height: 48px; /* Ensure minimum touch target */
    display: inline-flex;
    align-items: center;
}

.nav-links a:hover,
.nav-links a:focus {
    background: rgba(255, 255, 255, 0.15);
    outline: 2px solid rgba(255, 255, 255, 0.5); /* Higher contrast for accessibility */
    outline-offset: 2px;
}

/* Active state - prominent white background with blue text */
.nav-links a.active {
    background: var(--pc-white) !important;
    color: var(--pc-blue) !important;
    font-weight: 600; /* Semi-bold for active state */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Subtle shadow for depth */
}

/* Buttons in navbar need white text for visibility on navy background */
.navbar .btn,
.navbar .nav-links .btn {
    color: var(--pc-white) !important;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.navbar .btn:hover,
.navbar .nav-links .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar .btn-primary,
.navbar .nav-links .btn-primary {
    background: var(--pc-white);
    color: var(--pc-blue) !important;
}

.navbar .btn-primary:hover,
.navbar .nav-links .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* User info text in navbar */
.navbar #user-info,
.navbar #current-username {
    color: var(--pc-white);
}

.navbar #current-username {
    opacity: 0.9;
}

/* ===== Card System (Base Card) ===== */
.card {
    border: 1px solid var(--border); /* Subtle border for definition */
    border-radius: var(--radius-lg); /* 24px per design system */
    background: var(--surface); /* Light gray (#fafafa) for contrast against white background */
    box-shadow: var(--shadow-sm); /* Soft navy shadow with increased opacity */
    overflow: hidden;
    padding: calc(var(--space-6) + var(--space-1)); /* 36px = 32px + 4px increased spacing */
    margin-bottom: var(--space-5); /* 24px spacing between cards */
    border-left: 4px solid transparent; /* Default - can be overridden with accent classes */
}

/* Dashboard Cards with Vibrant Accents */
.card.goals-section {
    border-left: 8px solid var(--pc-mint); /* Mint accent for goals */
}

.card.focus-area-card {
    border-left: 8px solid var(--pc-blue); /* Blue accent for focus areas */
}

.card.education-section,
.card.knowledge-section {
    border-left: 8px solid var(--pc-blue); /* Blue accent for education */
}

.card .row {
    padding: 14px;
}

.card .row + .row {
    border-top: 1px solid rgba(17, 19, 24, 0.08); /* Subtle divider */
}

.card .kicker {
    font-size: 14px; /* Increased from 13px - minimum for accessibility */
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500; /* Medium weight */
    display: block;
    margin-bottom: 0.75rem; /* Spacing for hierarchy */
}

.card h3 {
    font-size: 16px; /* Medium size */
    font-weight: 500; /* Medium weight */
    letter-spacing: -0.01em;
    margin: 6px 0 8px 0;
    color: var(--ink);
}

.card p {
    margin: 8px 0 0 0;
    color: var(--ink-2);
    font-size: 16px; /* Medium size */
    font-weight: 400; /* Regular weight */
    line-height: 1.6;
}

.grid {
    display: grid;
    gap: 16px; /* 8px grid: 16px */
}

@media (min-width: 900px) {
    .grid {
        grid-template-columns: 1.2fr 0.8fr; /* 2-column layout on desktop */
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px; /* 8px grid */
    border-radius: var(--radius-md); /* 16px per design system */
    border: 1px solid rgba(38, 59, 127, 0.22);
    background: linear-gradient(180deg, rgba(38, 59, 127, 0.96), rgba(38, 59, 127, 0.86));
    color: var(--pc-white);
    font-weight: 500; /* Medium weight */
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(38, 59, 127, 0.20);
    text-decoration: none;
    user-select: none;
    min-height: 48px; /* Accessibility: minimum 48px touch target */
    font-size: 14px; /* Increased from 13px - minimum for accessibility */
    transition: all 0.2s ease; /* Per design system */
}

.btn:focus {
    outline: none;
    box-shadow: var(--shadow-md), var(--ring-accessible);
}

.btn-primary {
    background: linear-gradient(180deg, rgba(38, 59, 127, 0.96), rgba(38, 59, 127, 0.86));
    color: var(--pc-white);
    border-color: rgba(38, 59, 127, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--pc-blue-hover), rgba(38, 59, 127, 0.9));
    transform: translateY(-1px);
}

/* Extra-Large "Vibrant" Buttons for accessibility */
.btn-primary-xl {
    background-color: var(--pc-blue);
    color: var(--pc-white);
    padding: 20px 32px; /* Massive 48px+ hit area */
    font-size: 18px;
    font-weight: 700;
    border-radius: var(--radius-md);
    width: 100%; /* Better for mobile/tablet users */
    transition: transform 0.2s ease;
    min-height: 48px; /* Ensure minimum touch target */
    border: 1px solid rgba(38, 59, 127, 0.22);
    box-shadow: 0 10px 22px rgba(38, 59, 127, 0.20);
}

.btn-primary-xl:hover {
    background-color: var(--pc-blue-hover);
    transform: translateY(-2px);
}

.btn-primary-xl:focus {
    outline: none;
    box-shadow: var(--shadow-md), var(--ring-accessible);
}

.btn-secondary {
    background: rgba(38, 59, 127, 0.06);
    color: var(--pc-blue);
    box-shadow: none;
    border-color: rgba(38, 59, 127, 0.18);
}

.btn-secondary:hover {
    background: rgba(38, 59, 127, 0.10);
}

.btn-ghost {
    background: transparent;
    color: var(--pc-blue);
    box-shadow: none;
    border-color: rgba(17, 19, 24, 0.16);
}

.btn-ghost:hover {
    background: rgba(38, 59, 127, 0.06);
}

.btn-warning,
.btn-engagement,
.btn-danger {
    background: linear-gradient(180deg, rgba(226, 87, 68, 0.98), rgba(226, 87, 68, 0.86));
    border-color: rgba(226, 87, 68, 0.22);
    color: var(--pc-white);
    box-shadow: 0 10px 22px rgba(226, 87, 68, 0.20);
}

.btn-warning:hover,
.btn-engagement:hover,
.btn-danger:hover {
    background: linear-gradient(180deg, rgba(226, 87, 68, 1), rgba(226, 87, 68, 0.9));
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(226, 87, 68, 0.3);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1.125rem;
    transition: all 0.2s;
    min-height: 48px; /* Large tap targets */
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--pc-blue);
    box-shadow: var(--ring-accessible); /* Higher contrast focus ring */
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: var(--surface);
    margin: 5% auto;
    padding: 24px; /* 8px grid */
    border-radius: var(--radius-lg);
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.goal-item, .tracker-item {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

/* Goal/tracker items - use consistent light backgrounds for better contrast */
.goal-item,
.tracker-item {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.goal-item:nth-child(even),
.tracker-item:nth-child(even) {
    background: var(--surface-2);
}

.goal-item:hover, .tracker-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

ul {
    list-style: none;
}

ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

ul li:last-child {
    border-bottom: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(38, 59, 127, 0.18);
    background: rgba(38, 59, 127, 0.06);
    color: var(--pc-blue);
    font-weight: 500; /* Medium weight */
    font-size: 14px; /* Increased from 13px - minimum for accessibility */
    white-space: nowrap;
    min-height: 32px; /* Ensure readable touch target */
}

.badge-success,
.badge-complete {
    background: rgba(38, 59, 127, 0.06);
    color: var(--pc-blue);
    border-color: rgba(38, 59, 127, 0.18);
}

.badge-warning,
.badge-in-progress {
    background: rgba(226, 87, 68, 0.08);
    color: var(--pc-coral);
    border-color: rgba(226, 87, 68, 0.22);
}

/* ===== Inputs, Forms, Filters ===== */
.field {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

label {
    font-size: 13px; /* Small size */
    font-weight: 500; /* Medium weight */
    color: var(--ink-2);
}

input, select, textarea {
    font: inherit;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(17, 19, 24, 0.18);
    background: var(--surface);
    outline: none;
    font-size: 16px;
    min-height: 48px; /* Accessibility: minimum 48px touch target */
}

input:focus, select:focus, textarea:focus {
    box-shadow: var(--ring-accessible); /* Higher contrast focus ring */
    border-color: rgba(38, 59, 127, 0.45);
}

.help {
    font-size: 13px; /* Small size */
    font-weight: 400; /* Regular weight */
    color: var(--muted);
}

/* ===== Alert Card ===== */
.alert,
.alert-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(226, 87, 68, 0.22);
    background: rgba(226, 87, 68, 0.08);
}

.alert .icon,
.alert-card .icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: rgba(226, 87, 68, 0.20);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500; /* Medium weight */
    color: #8a2e22;
    flex: 0 0 auto;
}

.alert strong,
.alert-card strong {
    display: block;
    font-size: 13px;
    letter-spacing: 0.02em;
    color: var(--ink);
}

.alert span,
.alert-card span {
    display: block;
    font-size: 13px;
    color: var(--ink-2);
    margin-top: 2px;
}

/* Knowledge Center Card Grid */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; /* 8px grid */
    margin-top: 24px; /* 8px grid: 24px */
}

.knowledge-card {
    border-radius: var(--radius-md);
    padding: 16px 18px; /* 8px grid: 16-18px */
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.knowledge-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(38, 59, 127, 0.25);
}

.knowledge-card h4 {
    font-size: 16px; /* Medium size */
    font-weight: 500; /* Medium weight */
    letter-spacing: -0.01em;
    margin-bottom: 1rem; /* Spacing for hierarchy */
    color: var(--ink);
}

.knowledge-card p {
    color: var(--ink-2);
    font-size: 16px; /* Medium size */
    font-weight: 400; /* Regular weight */
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 12px;
}

.knowledge-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.knowledge-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    min-width: 48px; /* Minimum 48px touch target */
    min-height: 48px; /* Minimum 48px touch target */
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

.btn-icon.bookmarked {
    background: var(--pc-blue);
    color: var(--pc-white);
    border-color: var(--pc-blue);
}

.search-bar {
    margin-bottom: 2rem;
}

.search-bar input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid rgba(17, 19, 24, 0.18);
    border-radius: 14px;
    background: var(--surface);
    min-height: 48px; /* Minimum 48px touch target */
}

.search-bar input:focus {
    box-shadow: var(--ring-accessible); /* Higher contrast focus ring */
    border-color: rgba(38, 59, 127, 0.45);
}

.progress-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--pc-blue) 0deg 270deg, var(--border) 270deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500; /* Medium weight */
    font-size: 16px; /* Medium size */
    color: var(--ink);
}

.streak-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 14px; /* 8px grid */
    background: var(--pc-blue);
    color: var(--pc-white);
    border-radius: 999px;
    font-weight: 500; /* Medium weight */
    font-size: 13px; /* Small size */
}

/* Goal Tracking Section - Use blue and gray for status differentiation */
.goal-complete {
    color: var(--ink);
    border-left: 4px solid var(--pc-blue);
}

.goal-in-progress {
    color: var(--ink-2);
    border-left: 4px solid var(--pc-coral);
}

/* Community Section - Use blue accents */
.community-card {
    border-top: 3px solid var(--pc-blue);
}

.community-contact {
    color: var(--pc-blue);
    font-weight: 600;
}

@media print {
    .navbar, .btn {
        display: none;
    }
    .card {
        page-break-inside: avoid;
    }
}

/* Chat Interface Styles - Collapsible Side Window */
.chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--pc-blue);
    color: var(--pc-white);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* Softer shadow */
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.chat-toggle-btn:hover {
    background: var(--pc-blue-hover);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); /* Softer shadow */
}

.chat-toggle-btn:focus {
    outline: none;
    box-shadow: var(--ring);
    outline-offset: 2px;
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: none;
    flex-direction: column;
    z-index: 999;
    border: 1px solid var(--border);
    overflow: hidden;
}

.chat-window.open {
    display: flex;
}

.chat-window-header {
    background: var(--pc-blue);
    color: var(--pc-white);
    padding: 16px 18px; /* 8px grid */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.chat-window-header h3 {
    margin: 0;
    font-size: 16px; /* Medium size */
    font-weight: 500; /* Medium weight */
    letter-spacing: -0.01em;
    color: var(--pc-white);
}

.chat-window-close {
    background: none;
    border: none;
    color: var(--pc-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.chat-window-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-window-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

#chat-container {
    margin-bottom: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg);
    min-height: 200px;
    max-height: 400px;
}

.chat-message {
    margin-bottom: 12px; /* 8px grid */
    padding: 10px 12px; /* 8px grid */
    border-radius: var(--radius-sm);
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message-user {
    background: var(--pc-blue);
    color: var(--pc-white);
    margin-left: auto;
    text-align: right;
}

.chat-message-assistant {
    background: var(--surface-2);
    color: var(--text);
    margin-right: auto;
}

.chat-message-loading {
    opacity: 0.7;
    font-style: italic;
}

.chat-message-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.chat-message-content {
    margin-bottom: 0.25rem;
    line-height: 1.6;
}

/* Markdown formatting in chat messages */
.chat-message-content p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.chat-message-content p:first-child {
    margin-top: 0;
}

.chat-message-content p:last-child {
    margin-bottom: 0;
}

.chat-message-content h1,
.chat-message-content h2,
.chat-message-content h3,
.chat-message-content h4 {
    margin: 0.75rem 0 0.5rem 0;
    font-weight: 500; /* Medium weight */
    line-height: 1.4;
    color: inherit;
}

.chat-message-content h1 {
    font-size: 22px; /* Large size */
    font-weight: 500; /* Medium weight */
}

.chat-message-content h2 {
    font-size: 22px; /* Large size */
    font-weight: 500; /* Medium weight */
}

.chat-message-content h3 {
    font-size: 16px; /* Medium size */
    font-weight: 500; /* Medium weight */
}

.chat-message-content h4 {
    font-size: 16px; /* Medium size */
    font-weight: 500; /* Medium weight */
}

.chat-message-content ul,
.chat-message-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.chat-message-content li {
    margin: 0.25rem 0;
    line-height: 1.6;
}

.chat-message-content ul {
    list-style-type: disc;
}

.chat-message-content ol {
    list-style-type: decimal;
}

.chat-message-content strong {
    font-weight: 600; /* Semi-bold weight */
    color: inherit;
}

.chat-message-content em {
    font-style: italic;
}

.chat-message-content code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.chat-message-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 0.5rem 0;
}

.chat-message-content pre code {
    background: none;
    padding: 0;
}

.chat-message-content a {
    color: var(--pc-blue);
    text-decoration: underline;
    word-break: break-word;
}

.chat-message-content a:hover {
    color: rgba(38, 59, 127, 0.8);
}

.chat-message-content blockquote {
    border-left: 3px solid var(--pc-blue);
    padding-left: 0.75rem;
    margin: 0.5rem 0;
    color: var(--muted);
    font-style: italic;
}

/* User message markdown (lighter styling since it's on blue background) */
.chat-message-user .chat-message-content h1,
.chat-message-user .chat-message-content h2,
.chat-message-user .chat-message-content h3,
.chat-message-user .chat-message-content h4 {
    color: var(--pc-white);
}

.chat-message-user .chat-message-content code {
    background: rgba(255, 255, 255, 0.2);
    color: var(--pc-white);
}

.chat-message-user .chat-message-content pre {
    background: rgba(255, 255, 255, 0.15);
}

.chat-message-user .chat-message-content a {
    color: var(--pc-white);
    text-decoration: underline;
}

.chat-message-user .chat-message-content blockquote {
    border-left-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.chat-message-time {
    font-size: 13px; /* Small size */
    font-weight: 400; /* Regular weight */
    opacity: 0.7;
    margin-top: 4px; /* 8px grid */
    color: var(--muted);
}

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    padding: 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.chat-input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 1px solid rgba(17, 19, 24, 0.18);
    border-radius: 14px;
    font-family: var(--font-body);
    background: var(--surface);
    min-height: 44px;
}

.chat-input:focus {
    outline: none;
    box-shadow: var(--ring-accessible); /* Higher contrast focus ring */
    border-color: rgba(38, 59, 127, 0.45);
}

.chat-send-btn {
    padding: 12px 14px; /* 8px grid */
    min-width: 100px;
    min-height: 48px; /* Minimum 48px touch target */
    font-size: 14px; /* Increased from 13px - minimum for accessibility */
    font-weight: 500; /* Medium weight */
}

/* Inline chat for Learn page */
.chat-window.chat-inline {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 600px !important;
    margin-bottom: 1.5rem;
    display: flex !important; /* Always visible when inline */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure chat input is visible in inline mode */
.chat-window.chat-inline .chat-input-container {
    display: flex !important;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    visibility: visible !important;
}

.chat-window.chat-inline .chat-input {
    flex: 1;
    min-height: 48px;
    display: block !important;
    visibility: visible !important;
}

.chat-window.chat-inline .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    min-height: 200px;
    max-height: 400px;
    display: block !important;
    visibility: visible !important;
}

/* Ensure chat container in Learn page is always visible when tab is active */
#ask-tab.active #chat-container {
    display: block !important;
    visibility: visible !important;
}

#ask-tab.active #chat-container .chat-window {
    display: flex !important;
    visibility: visible !important;
}

/* Mobile responsive chat */
@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 80px;
        max-height: calc(100vh - 100px);
    }
    
    .chat-window.chat-inline {
        width: 100% !important;
        max-width: 100% !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    .chat-window.chat-inline .chat-messages {
        max-height: 300px;
    }
    
    .chat-toggle-btn {
        bottom: 15px;
        right: 15px;
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .chat-messages {
        max-height: 300px;
    }
}

/* ===== Design System Utility Classes ===== */
/* Text Colors */
.text-muted {
    color: var(--muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-primary {
    color: var(--pc-blue) !important;
}

.text-error {
    color: var(--pc-coral) !important;
}

/* Typography Utilities */
.heading-page {
    font-family: var(--font-display);
    font-weight: 600; /* Softer than 700 */
    font-size: 26px;
    color: var(--ink-2); /* Softer color */
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em; /* Softer letter spacing */
}

.heading-section {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    color: var(--ink-2); /* Softer color */
    margin-bottom: 1rem;
    letter-spacing: 0.01em; /* Softer letter spacing */
}

.heading-card {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 16px;
    color: var(--ink-2); /* Softer color */
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: 0.01em; /* Softer letter spacing */
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
}

.body-text-muted {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted);
}

/* Remove all inline color styles - use these classes instead */

/* Force consistent body text */
body, p {
    font-family: var(--font-body) !important;
    color: var(--text) !important;
}

/* Override any inline color styles with design system */
p {
    color: var(--text) !important;
}

/* Ensure all text uses design system colors */
* {
    /* Override common hardcoded colors */
}

/* Specific overrides for common hardcoded colors */
[style*="#666"], [style*="color: #666"] {
    color: var(--muted) !important;
}

[style*="#333"], [style*="color: #333"] {
    color: var(--ink) !important;
}

[style*="#444"], [style*="color: #444"] {
    color: var(--ink-2) !important;
}

[style*="#d32f2f"], [style*="color: #d32f2f"] {
    color: var(--pc-coral) !important;
}

.chat-citations {
    margin-top: 12px; /* 8px grid */
    padding: 12px 14px; /* 8px grid */
    background: var(--surface);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--pc-blue);
    font-size: 13px;
}

.chat-citations ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

.chat-citations li {
    margin-bottom: 0.5rem;
}

.chat-citations a {
    color: var(--ink);
    text-decoration: underline;
}

/* Hide forms when chat works */
#forms-container[style*="display: none"] {
    display: none !important;
}

/* Multi-Chat Floating Windows */
.multi-chat-window {
    position: fixed;
    width: 380px;
    height: 500px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border: 2px solid;
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.multi-chat-window:hover {
    box-shadow: var(--shadow-xl);
}

.multi-chat-header {
    background: inherit;
    color: var(--pc-white);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    cursor: move;
}

.multi-chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.multi-chat-icon {
    font-size: 1.5rem;
}

.multi-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500; /* Medium weight */
    color: var(--pc-white);
}

.multi-chat-header-actions {
    display: flex;
    gap: 8px;
}

.multi-chat-minimize,
.multi-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--pc-white);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.multi-chat-minimize:hover,
.multi-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.multi-chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.multi-chat-container .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg);
}

.multi-chat-container .chat-input-container {
    padding: 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

/* Multi-Chat Toggle Buttons */
.multi-chat-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.multi-chat-launcher-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pc-white);
    font-weight: 600;
}

.multi-chat-launcher-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.multi-chat-launcher-btn.knowledge {
    background: #2563eb;
}

.multi-chat-launcher-btn.care-finder {
    background: #16a34a;
}

.multi-chat-launcher-btn.navigator {
    background: #9333ea;
}

/* Mobile responsive for multi-chat */
@media (max-width: 768px) {
    .multi-chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        right: 10px !important;
        bottom: 80px !important;
    }
    
    .multi-chat-launcher {
        bottom: 15px;
        right: 15px;
    }
    
    .multi-chat-launcher-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Care Finder Table Styles */
.services-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.services-table th {
    background: var(--surface-2);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 2px solid var(--pc-blue);
}

.services-table td {
    padding: 12px 14px; /* 8px grid */
    border-bottom: 1px solid var(--border);
    font-size: 16px; /* Medium size */
    font-weight: 400; /* Regular weight */
}

.services-table tbody tr:hover {
    background: var(--surface-2);
    cursor: pointer;
}

.services-table tbody tr:last-child td {
    border-bottom: none;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px; /* 8px grid */
    background: var(--surface-2);
    color: var(--ink);
    border-radius: 999px;
    font-size: 13px; /* Small size */
    font-weight: 500; /* Medium weight */
    border: 1px solid var(--border);
}

.active-filters {
    min-height: 2.5rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.view-toggle .btn.active {
    background: var(--pc-blue);
    color: var(--pc-white);
}

.result-summary {
    font-size: 13px;
    color: var(--muted);
}

/* Map Container */
#map-container {
    height: 500px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 4px;
    z-index: 1;
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 0.75rem;
}

/* Mobile Card View */
@media (max-width: 768px) {
    .services-table {
        display: none;
    }
    
    .mobile-cards-view {
        display: block !important;
    }
    
    .service-card {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .service-card h4 {
        margin-top: 0;
        color: var(--ink);
    }
    
    .service-card .service-meta {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
        font-size: 0.875rem;
        color: var(--muted);
    }
    
    #map-container {
        height: 400px;
    }
}

/* ===== Today Screen Styles ===== */
.today-screen {
    max-width: 800px;
    margin: 0 auto;
}

.focus-area-card {
    background: var(--surface);
    border-left: 4px solid var(--pc-blue);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.focus-area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.focus-area-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(38, 59, 127, 0.1);
    color: var(--pc-blue);
    border-radius: 20px;
    font-weight: 500; /* Medium weight */
    font-size: 16px; /* Medium size */
}

.focus-area-description {
    color: var(--muted);
    margin: 0;
}

.actions-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 0.5rem;
}

/* Responsive: Single column on mobile */
@media (max-width: 768px) {
    .actions-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.action-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.action-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.action-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.action-type-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.action-type-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.action-header h4 {
    flex: 1;
    margin: 0;
    font-size: 16px; /* Medium size */
    font-weight: 500; /* Medium weight */
    line-height: 1.3;
}

.action-duration {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.action-description {
    color: var(--muted);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    flex: 1;
}

.try-action-btn {
    width: 100%;
    margin-top: auto;
}

/* ===== Modal Styles ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--surface);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-md);
    position: relative;
}

.close {
    color: var(--muted);
    float: right;
    font-size: 22px; /* Large size */
    font-weight: 500; /* Medium weight */
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: var(--ink);
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.radio-group label:hover {
    background: var(--surface-2);
    border-color: var(--pc-blue);
}

.radio-group input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.adapt-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.adapt-option-btn {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.adapt-option-btn:hover {
    border-color: var(--pc-blue);
    background: rgba(38, 59, 127, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.adapt-option-btn strong {
    display: block;
    color: var(--pc-blue);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.adapt-option-btn p {
    color: var(--muted);
    margin: 0;
    font-size: 0.875rem;
}

/* Navigation active state - already defined above with prominent white background */

/* ===== Activity Detail Styles ===== */
.activity-detail {
    max-width: 800px;
    margin: 0 auto;
}

.activity-header {
    margin-bottom: 1.5rem;
}

.activity-header h2 {
    margin-top: 0.5rem;
}

.activity-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.activity-type,
.activity-duration {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
}

.activity-description {
    margin-bottom: 2rem;
}

.activity-description p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.activity-content {
    background: var(--surface-2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.activity-content h3 {
    margin-bottom: 1rem;
    color: var(--pc-blue);
}

.activity-content p {
    color: var(--muted);
    line-height: 1.6;
}

.activity-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ===== Knowledge Center Curated Section Styles ===== */
.curated-section {
    margin-bottom: 2rem;
    border: 2px solid var(--pc-mint);
    background: linear-gradient(to bottom, rgba(204, 233, 228, 0.1), var(--surface));
}

.curated-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.curated-header h3 {
    margin: 0;
    color: var(--pc-blue);
}

.curated-subtitle {
    color: var(--muted);
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
}

.curated-content {
    margin-top: 1rem;
}

.focus-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--surface-2);
    border-left: 4px solid var(--pc-blue);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.badge-text {
    font-size: 0.875rem;
    color: var(--muted);
}

.badge-text strong {
    color: var(--pc-blue);
    font-weight: 500; /* Medium weight */
}

.curated-grid {
    margin-top: 1rem;
}

.curated-card {
    border: 2px solid var(--pc-mint);
    background: var(--surface);
}

.curated-card:hover {
    border-color: var(--pc-blue);
    box-shadow: var(--shadow-md);
}

.curated-empty {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
}

/* Groups Grid (similar to knowledge-grid) */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.group-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.group-card:hover {
    border-color: var(--pc-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.group-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    flex: 1;
}

.group-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: capitalize;
    white-space: nowrap;
}

.group-location {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.group-description {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.group-contact-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--muted);
}

.group-contact-info p {
    margin: 0.25rem 0;
}

.group-contact-info a {
    color: var(--pc-blue);
    text-decoration: none;
}

.group-contact-info a:hover {
    text-decoration: underline;
}

.early-diagnosis-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--pc-mint);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pc-blue);
    margin-left: 0.5rem;
}

.content-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: capitalize;
}

.knowledge-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

/* ===== Learn System Styles (Phase K2) ===== */

/* Tab Navigation */
.learn-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.learn-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    margin-bottom: -2px;
}

.learn-tab:hover {
    color: var(--primary);
}

.learn-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.learn-tab-content {
    display: none;
}

.learn-tab-content.active {
    display: block;
}

/* Module Cards */
.learn-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.learn-module-card {
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.learn-module-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(38, 59, 127, 0.25);
}

.module-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.module-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: capitalize;
}

.module-reading-time {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.module-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.module-excerpt {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.module-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    gap: 0.75rem;
    flex-wrap: wrap;
}

.module-tag,
.module-stage {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: capitalize;
}

.btn-read-module {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-read-module:hover {
    background: var(--pc-blue-hover);
}

/* Topic Tiles */
.learn-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.learn-topic-tile {
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.learn-topic-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(38, 59, 127, 0.25);
}

.learn-topic-tile h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.topic-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.topic-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.topic-bullets li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.topic-bullets li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.btn-explore-topic {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
    margin-top: auto;
}

.btn-explore-topic:hover {
    background: var(--pc-blue-hover);
}

/* Path Cards */
.learn-paths-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.learn-path-card {
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    background: var(--surface);
}

.learn-path-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(38, 59, 127, 0.25);
}

.path-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.path-card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    flex: 1;
}

.path-time {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.path-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.path-progress {
    margin-bottom: 1.5rem;
}

.path-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.path-progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.path-progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.path-card-footer {
    display: flex;
    justify-content: flex-end;
}

.btn-path-cta {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-path-cta:hover {
    background: var(--pc-blue-hover);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .learn-tabs {
        gap: 0.25rem;
    }
    
    .learn-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .learn-modules-grid,
    .learn-topics-grid {
        grid-template-columns: 1fr;
    }
    
    .module-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-read-module {
        width: 100%;
    }
}

.content-preview {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.duration {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== Content Detail Modal Styles ===== */
.modal-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    flex: 1;
    padding-right: 1rem;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.content-meta {
    margin-bottom: 1.5rem;
}

.content-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.content-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
}

.content-text {
    line-height: 1.7;
    color: var(--text-secondary);
}

.content-body {
    font-size: 1rem;
    line-height: 1.7;
}

.content-body p {
    margin-bottom: 1rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
    
    .modal-large {
        max-width: 95%;
    }
    
    .action-header {
        flex-wrap: wrap;
    }
    
    .adapt-options {
        gap: 0.75rem;
    }
    
    .activity-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .curated-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* ===== Developer Tools Page (TEMPORARY) ===== */
.developer-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.developer-page .page-header {
    margin-bottom: 2rem;
}

.warning-banner {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
    color: #856404;
    font-weight: 600;
}

.developer-sections {
    display: grid;
    gap: 1.5rem;
}

.dev-section {
    padding: 1.5rem;
}

.dev-section h3 {
    margin-bottom: 1rem;
    color: var(--pc-blue);
}

.dev-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.dev-section ul li {
    margin-bottom: 0.5rem;
}

.dev-section .btn {
    margin-top: 1rem;
    margin-right: 0.5rem;
}

.status-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.data-display {
    margin-top: 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    max-height: 500px;
    overflow: auto;
}

.data-display pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px; /* Small size */
    font-weight: 400; /* Regular weight */
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.test-data-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* ===== Guided Journey Enhancement Styles ===== */

/* Goals Section */
.goals-section {
    margin-top: 1.5rem;
}

.goals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.goals-header h3 {
    margin: 0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 14px; /* Increased from 13px - minimum for accessibility */
    font-weight: 500; /* Medium weight */
    min-height: 48px; /* Ensure minimum touch target */
}

.goals-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.goal-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    transition: box-shadow 0.2s;
}

.goal-card:hover {
    box-shadow: var(--shadow-sm);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.goal-header h4 {
    flex: 1;
    margin: 0;
    font-size: 16px; /* Medium size */
    font-weight: 500; /* Medium weight */
}

.progress-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 13px; /* Small size */
    font-weight: 500; /* Medium weight */
}

.progress-badge.on-track {
    background: #d4edda;
    color: #155724;
}

.progress-badge.needs-attention {
    background: #fff3cd;
    color: #856404;
}

.goal-description {
    color: var(--text-secondary);
    font-size: 13px; /* Small size */
    font-weight: 400; /* Regular weight */
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.empty-state {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Curated Resources Section */
.curated-resources-section {
    margin-top: 1.5rem;
}

.curated-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.curated-header h3 {
    margin: 0;
}

.curated-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.curated-column {
    display: flex;
    flex-direction: column;
}

.curated-column h4 {
    font-size: 16px; /* Medium size */
    font-weight: 500; /* Medium weight */
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.curated-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.curated-item-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    transition: box-shadow 0.2s;
}

.curated-item-card:hover {
    box-shadow: var(--shadow-sm);
}

.curated-item-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.content-type-badge,
.group-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 13px; /* Small size */
    font-weight: 500; /* Medium weight */
    background: var(--pc-mint);
    color: var(--pc-blue);
}

.group-type-badge.online {
    background: #e3f2fd;
    color: #1976d2;
}

.group-type-badge.local {
    background: #f3e5f5;
    color: #7b1fa2;
}

.group-type-badge.hybrid {
    background: #fff3e0;
    color: #e65100;
}

.curated-item-card h5 {
    font-size: 16px; /* Medium size */
    font-weight: 500; /* Medium weight */
    margin: 0.75rem 0; /* Spacing for hierarchy */
    color: var(--ink);
}

.curated-item-location {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0.25rem 0;
}

.curated-item-preview {
    font-size: 13px; /* Small size */
    font-weight: 400; /* Regular weight */
    color: var(--text-secondary);
    margin: 0.5rem 0;
    line-height: 1.6;
}

.view-all-link {
    margin-top: 1rem;
    color: var(--pc-blue);
    text-decoration: none;
    font-size: 13px; /* Small size */
    font-weight: 500; /* Medium weight */
    display: inline-block;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Icon Styles */
.section-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.focus-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.action-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.content-type-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* Responsive: Stack columns on mobile */
@media (max-width: 768px) {
    .curated-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .goals-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .goal-header {
        flex-wrap: wrap;
    }
}

/* ===== Goals & Plans Page Styles ===== */

.goals-plans-page {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: var(--muted);
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    font-size: 16px;
    font-weight: 500;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.section-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
    margin-top: 0.25rem;
}

.goal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.goal-card-header > div:first-child {
    flex: 1;
}

.goal-card-header h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.goal-actions {
    display: flex;
    gap: 0.5rem;
}

.goal-description {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
    margin: 0.5rem 0;
    line-height: 1.6;
}

.goal-progress-notes {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.goal-progress-notes ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.goal-progress-notes li {
    margin: 0.25rem 0;
    color: var(--muted);
}

.goal-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    margin-left: 0.5rem;
}

.current-plan-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.plan-header h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.plan-date {
    font-size: 13px;
    color: var(--muted);
}

.plan-actions-section {
    margin-bottom: 1.5rem;
}

.plan-actions-section h5 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--muted);
}

.plan-actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plan-action-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.plan-action-item .action-type {
    padding: 0.25rem 0.5rem;
    background: var(--surface-2);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
}

.plan-action-item strong {
    flex: 1;
    font-weight: 500;
}

.plan-action-item .action-duration {
    color: var(--muted);
    font-size: 13px;
}

.plan-actions-buttons {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.plan-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.plan-history-item {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: box-shadow 0.2s;
}

.plan-history-item:hover {
    box-shadow: var(--shadow-sm);
}

.plan-history-item.current-plan {
    background: var(--accent-2);
    border-color: var(--primary);
}

.history-date {
    min-width: 120px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}

.history-details {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.history-details strong {
    font-size: 13px;
    font-weight: 500;
}

.history-adaptation {
    padding: 0.25rem 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    text-transform: capitalize;
}

.history-adaptation.current {
    background: var(--primary);
    color: var(--pc-white);
    border-color: var(--primary);
}

.history-actions-count {
    font-size: 13px;
    color: var(--muted);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
    font-size: 13px;
}

.plan-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.goals-header-actions {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .tabs {
        overflow-x: auto;
    }
    
    .tab-btn {
        white-space: nowrap;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .plan-actions-buttons {
        flex-direction: column;
    }
    
    .plan-actions-buttons .btn {
        width: 100%;
    }
    
    .plan-history-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .history-date {
        min-width: auto;
    }
    
    .goals-header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .goals-header-actions .btn {
        width: 100%;
    }
}

/* Plan Notes Styles */
.plan-notes-section {
    margin-top: 1.5rem;
}

.plan-notes-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    font-size: 16px;
    font-weight: 400;
    font-family: var(--font-body);
    line-height: 1.6;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    resize: vertical;
}

.plan-notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}

.plan-notes-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.plan-notes-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.plan-notes-hint {
    font-size: 13px;
    color: var(--muted);
}

/* Plan Summary Styles */
.plan-summary-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
}

.plan-summary-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.summary-focus-area {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.focus-area-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.focus-area-icon {
    font-size: 32px;
    line-height: 1;
}

.focus-area-header h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
}

.focus-area-description {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

.summary-actions {
    flex: 1;
}

.summary-text {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.summary-text p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
}

.summary-key-points {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.summary-key-points h5 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--muted);
}

.summary-key-points ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.summary-key-points li {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    margin: 0.5rem 0;
}

.summary-actions h5 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--muted);
}

.summary-links {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .plan-notes-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .summary-links {
        flex-direction: column;
    }
    
    .summary-links .btn {
        width: 100%;
    }
}

/* Default goals applied banner (Today screen) */
.default-goals-banner {
    background: var(--pc-mint);
    color: var(--pc-navy);
    border: 1px solid var(--pc-mint);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.default-goals-banner a {
    color: #1b5e20;
    font-weight: 600;
    text-decoration: underline;
}

/* ===== In-App Banner Notifications ===== */
.app-banner {
    position: fixed;
    top: 80px; /* Below navbar */
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 10000;
    min-width: 300px;
    max-width: 600px;
    width: 90%;
    padding: 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: all 0.3s ease-out;
    pointer-events: none;
}

.app-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.app-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 16px;
}

.app-banner-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.app-banner-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.app-banner-close:hover {
    opacity: 1;
}

/* Banner type styles */
.app-banner-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.app-banner-success {
    background: var(--pc-mint);
    color: var(--pc-navy);
    border: 1px solid var(--pc-mint);
}

.app-banner-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
}

.app-banner-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-banner {
        top: 70px;
        width: 95%;
        min-width: auto;
    }
    
    .app-banner-content {
        padding: 12px 16px;
    }
    
    .app-banner-message {
        font-size: 13px;
    }
}

/* Mobile navigation fixes */
@media (max-width: 768px) {
    .navbar .container {
        padding: 0 12px;
    }
    
    .nav-links {
        gap: 0.25rem;
        font-size: 13px;
    }
    
    .nav-links a {
        padding: 6px 10px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    #login-btn, #logout-btn {
        font-size: 12px;
        padding: 4px 10px;
        margin-left: 8px;
    }
    
    #user-info {
        margin-left: 8px;
    }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
    }
    
    /* Logo responsive behavior handled by .navbar-logo media query */
    
    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }
    
    .nav-links a {
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* ===== Utility Classes for Common Patterns ===== */
/* Goal-related cards with mint accent */
.card-goal-accent {
    background: var(--surface-2);
    border-left: 4px solid var(--pc-mint);
}

.card-goal-accent-strong {
    background: var(--surface-2);
    border: 2px solid var(--pc-mint);
}

/* Knowledge/Education cards with blue accent */
.card-knowledge-accent {
    background: #f0f7ff;
    border-left: 4px solid var(--pc-blue);
}

/* Success/completion badges */
.badge-success {
    padding: 8px 16px;
    background: var(--pc-mint);
    color: var(--ink);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

/* Welcome/entry cards */
.card-welcome {
    background: var(--surface-2);
    border: 2px solid var(--pc-mint);
    padding: 32px;
    text-align: center;
}

/* Goal selection card */
.goal-selection-card {
    background: var(--surface-2);
    border: 2px solid var(--pc-mint);
}

/* Starter question chips */
.starter-question-chip {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--pc-blue);
    border-radius: 20px;
    color: var(--pc-blue);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-height: 48px; /* Accessibility */
}

.starter-question-chip:hover {
    background: var(--pc-mint);
    border-color: var(--pc-blue);
}

.starter-question-chip:focus {
    outline: none;
    box-shadow: var(--ring-accessible);
}

/* ===== Dashboard Styles ===== */
/* All colors, spacing, radii, shadows use design tokens */

.dashboard-screen {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-5);
}

.dashboard-header {
    margin-bottom: var(--space-6);
}

.dashboard-header h2 {
    margin: 0 0 var(--space-2) 0;
    /* Uses global h2 styles - 26px, 600 weight, pc-navy color */
}

.dashboard-subtitle {
    color: var(--muted);
    font-size: 1rem;
    margin: 0;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--space-5);
}

.dashboard-main {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.stats-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: calc(var(--space-4) + var(--space-1)); /* 20px = 16px + 4px */
    box-shadow: var(--shadow-sm);
}

.stats-card h3 {
    margin: 0 0 var(--space-4) 0;
    /* Uses global h3 styles - 18px, 500 weight, pc-navy color */
    border-bottom: 2px solid var(--border);
    padding-bottom: var(--space-2);
}

/* Momentum row */
.momentum-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.momentum-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    padding: var(--space-4);
}

.momentum-card h3 {
    margin: 0 0 var(--space-2) 0;
    /* Uses global h3 styles */
}

.big-line {
    margin: var(--space-2) 0 0 0;
    font-size: 1.125rem;
    color: var(--ink);
    font-weight: 600;
}

.small-muted {
    margin: var(--space-3) 0 0 0;
    color: var(--muted);
    font-size: 0.875rem;
}

/* Compass ring */
.compass-wrap {
    display: flex;
    gap: calc(var(--space-3) + var(--space-1)); /* 14px */
    align-items: center;
}

.compass-ring {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: conic-gradient(var(--domain-move) var(--p), var(--border) 0);
    position: relative;
    flex: 0 0 auto;
}

.compass-ring::after {
    content: "";
    position: absolute;
    inset: 10px;
    background: var(--surface-2);
    border-radius: 50%;
    border: 1px solid var(--border);
}

.compass-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.compass-pct {
    font-weight: 700;
    color: var(--ink);
    font-size: 1.125rem;
}

.compass-sub {
    color: var(--muted);
    font-size: 0.75rem;
}

.compass-text .compass-kpi {
    color: var(--ink);
    margin-bottom: var(--space-3);
}

.compass-text .compass-nudge {
    color: var(--muted);
    font-size: 0.875rem;
}

/* Domain lanes */
.lanes-header {
    margin-top: var(--space-3);
    margin-bottom: var(--space-3);
}

.lanes-header h3 {
    margin: 0 0 var(--space-3) 0;
    /* Uses global h3 styles */
}

.domain-lanes {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-3);
    margin: var(--space-3) 0 calc(var(--space-5) + var(--space-1)) 0; /* 22px */
}

.domain-tile {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    padding: calc(var(--space-3) + var(--space-1)); /* 14px */
}

.domain-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: calc(var(--space-2) + var(--space-1)); /* 10px */
    margin-bottom: calc(var(--space-2) + var(--space-1)); /* 10px */
}

.domain-name {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--ink);
}

.domain-sub {
    margin: var(--space-1) 0 0 0;
    font-size: 0.8125rem;
    color: var(--muted);
}

.domain-chip {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: var(--space-1) var(--space-2);
    white-space: nowrap;
}

.domain-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
    border: 1px solid var(--border);
}

.domain-bar > span {
    display: block;
    height: 100%;
    width: var(--w);
    background: var(--c);
}

.domain-meta {
    display: flex;
    justify-content: space-between;
    margin-top: calc(var(--space-2) + var(--space-1)); /* 10px */
    font-size: 0.8125rem;
    color: var(--ink);
}

.domain-next {
    margin-top: calc(var(--space-2) + var(--space-1)); /* 10px */
    font-size: 0.8125rem;
    color: var(--muted);
}

.domain-next strong {
    color: var(--ink);
}

/* Activity header + legend */
.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-4);
    margin-top: calc(var(--space-2) + var(--space-1)); /* 10px */
    margin-bottom: calc(var(--space-2) + var(--space-1)); /* 10px */
}

.activity-header h3 {
    margin: 0;
    /* Uses global h3 styles */
}

.activity-legend {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--space-2) + var(--space-1)); /* 10px */
    font-size: 0.75rem;
    color: var(--muted);
}

.legend-chip {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-1) var(--space-2);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.legend-swatch.legend-move {
    background: var(--domain-move);
}

.legend-swatch.legend-recharge {
    background: var(--domain-recharge);
}

.legend-swatch.legend-connect {
    background: var(--domain-connect);
}

.legend-swatch.legend-medical {
    background: var(--domain-medical);
}

.legend-swatch.legend-adapt {
    background: var(--domain-adapt);
}

/* Utility class for hidden elements */
.hidden {
    display: none !important;
}

/* Utility class for flex column */
.flex-col {
    display: flex;
    flex-direction: column;
}

/* Body text utilities */
.body-text-muted {
    color: var(--muted);
    font-size: 0.875rem;
}

/* Today page styles */
.tracking-prompt {
    background: var(--surface-2);
    border: 2px solid var(--pc-mint);
    border-radius: var(--radius-lg);
    padding: calc(var(--space-4) + var(--space-1)); /* 20px */
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.prompt-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.prompt-message {
    margin: 0;
    font-size: 1rem;
    color: var(--ink);
    flex: 1;
}

.prompt-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.prompt-actions .btn {
    padding: calc(var(--space-2) + var(--space-1)) calc(var(--space-4) + var(--space-1)); /* 10px 20px */
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
}

.prompt-actions .btn-primary {
    background: var(--pc-navy);
    color: var(--pc-white);
}

.prompt-actions .btn-primary:hover {
    background: var(--pc-blue-hover);
}

.prompt-actions .btn-secondary {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.prompt-actions .btn-secondary:hover {
    background: var(--surface-2);
}

/* Next Step Card */
.next-step-card {
    background: linear-gradient(135deg, var(--pc-navy) 0%, var(--pc-blue-hover) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-vibrant);
    color: var(--pc-white);
}

.next-step-card h3 {
    margin: 0 0 var(--space-3) 0;
    font-size: 1.25rem;
    color: var(--pc-white);
}

.next-step-card p {
    margin: 0 0 var(--space-4) 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
}

.next-step-card .btn-primary {
    background: var(--pc-white);
    color: var(--pc-navy);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.2s ease;
    min-height: 48px;
}

.next-step-card .btn-primary:hover {
    background: var(--surface-2);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .prompt-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .prompt-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .prompt-actions .btn {
        width: 100%;
    }
}

/* Welcome page styles */
.welcome-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--space-6) + var(--space-4)) var(--space-5);
    background: var(--surface-2);
}

.welcome-container {
    max-width: 600px;
    width: 100%;
}

.welcome-header {
    text-align: center;
    margin-bottom: calc(var(--space-5) + var(--space-2));
}

.welcome-header h1 {
    /* Uses global h1 styles - 32px, 600 weight, pc-navy color */
    margin-bottom: calc(var(--space-2) + var(--space-1));
}

.welcome-subtitle {
    font-size: 1.125rem;
    color: var(--muted);
}

.welcome-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: calc(var(--space-6) + var(--space-4));
    box-shadow: var(--shadow-sm);
}

.welcome-form-section {
    margin-bottom: calc(var(--space-5) + var(--space-2));
}

.welcome-form-section h2 {
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: var(--space-2);
}

.welcome-form-help-text {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-5);
}

.welcome-form-group {
    margin-bottom: var(--space-5);
}

.welcome-form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: calc(var(--space-3) + var(--space-2));
}

.welcome-form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--ink);
}

.welcome-form-group .required {
    color: var(--pc-coral);
}

.welcome-form-group .optional {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.8125rem;
}

.welcome-form-group input {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: var(--surface);
    color: var(--ink);
}

.welcome-form-group input:focus {
    outline: none;
    border-color: var(--pc-navy);
    box-shadow: var(--ring);
}

.welcome-form-help {
    display: block;
    margin-top: var(--space-1);
    font-size: 0.8125rem;
    color: var(--muted);
}

.welcome-form-actions {
    margin-top: calc(var(--space-5) + var(--space-2));
}

.welcome-btn-primary {
    width: 100%;
    padding: calc(var(--space-3) + var(--space-1));
    background: var(--pc-navy);
    color: var(--pc-white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.welcome-btn-primary:hover {
    background: var(--pc-blue-hover);
}

.welcome-btn-primary:disabled {
    background: var(--muted);
    cursor: not-allowed;
}

.welcome-footer {
    margin-top: calc(var(--space-5) + var(--space-2));
    text-align: center;
}

.welcome-privacy-note {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 600px) {
    .welcome-form-row {
        grid-template-columns: 1fr;
    }
    
    .welcome-card {
        padding: calc(var(--space-5) + var(--space-2)) var(--space-5);
    }
    
    .welcome-header h1 {
        font-size: 1.75rem;
    }
}

/* Message styles for welcome page */
.welcome-message {
    margin-top: var(--space-5);
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.welcome-message.success {
    background: var(--pc-mint);
    color: var(--pc-navy);
    border: 1px solid var(--pc-mint);
}

.welcome-message.error {
    background: rgba(226, 87, 68, 0.1);
    color: var(--pc-coral);
    border: 1px solid var(--pc-coral);
}

/* Onboarding page styles */
.onboarding-page {
    min-height: calc(100vh - 200px);
    padding: calc(var(--space-6) + var(--space-4)) var(--space-5);
    background: var(--surface-2);
}

.onboarding-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: calc(var(--space-6) + var(--space-4));
    box-shadow: var(--shadow-sm);
}

.onboarding-progress {
    margin-bottom: calc(var(--space-6) + var(--space-4));
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: var(--space-2);
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background: var(--pc-navy);
    color: var(--pc-white);
}

.progress-step.completed .step-number {
    background: var(--pc-navy);
    color: var(--pc-white);
}

.progress-step.completed .step-number::after {
    content: '✓';
}

.step-label {
    font-size: 0.875rem;
    color: var(--muted);
    font-weight: 500;
}

.progress-step.active .step-label {
    color: var(--pc-navy);
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 calc(var(--space-2) + var(--space-1));
    margin-bottom: calc(var(--space-5) + var(--space-1));
}

.onboarding-step {
    display: none;
}

.onboarding-step.active {
    display: block;
}

.onboarding-step.hidden {
    display: none !important;
}

.step-header {
    margin-bottom: calc(var(--space-5) + var(--space-2));
    text-align: center;
}

.step-header h2 {
    font-size: 1.75rem;
    color: var(--ink);
    margin-bottom: var(--space-2);
}

.step-description {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
}

.onboarding-form {
    margin-top: calc(var(--space-5) + var(--space-2));
}

.onboarding-form-section {
    margin-bottom: calc(var(--space-5) + var(--space-2));
}

.onboarding-form-group {
    margin-bottom: var(--space-5);
    position: relative;
}

.onboarding-form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--ink);
}

.onboarding-form-group .required {
    color: var(--pc-coral);
}

.onboarding-form-group input,
.onboarding-form-group select,
.onboarding-form-group textarea {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    background: var(--surface);
    color: var(--ink);
}

.onboarding-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.onboarding-form-group input:focus,
.onboarding-form-group select:focus,
.onboarding-form-group textarea:focus {
    outline: none;
    border-color: var(--pc-navy);
    box-shadow: var(--ring);
}

.onboarding-form-help {
    display: block;
    margin-top: var(--space-1);
    font-size: 0.8125rem;
    color: var(--muted);
}

.onboarding-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--space-3) + var(--space-2));
}

.onboarding-form-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    margin-top: calc(var(--space-5) + var(--space-2));
    padding-top: calc(var(--space-5) + var(--space-2));
    border-top: 1px solid var(--border);
}

.onboarding-goals-list {
    margin: var(--space-5) 0;
}

.onboarding-goal-card {
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.onboarding-goal-card h4 {
    margin: 0 0 var(--space-2) 0;
    color: var(--ink);
}

.onboarding-goal-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.location-suggestions {
    position: absolute;
    z-index: 1000;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    max-height: 200px;
    overflow-y: auto;
    margin-top: 2px;
    width: 100%;
    box-sizing: border-box;
}

.location-suggestion-item {
    padding: calc(var(--space-2) + var(--space-1)) var(--space-3);
    cursor: pointer;
    border-bottom: 1px solid var(--surface-2);
    transition: background-color 0.2s;
}

.location-suggestion-item:hover,
.location-suggestion-item.selected {
    background-color: var(--surface-2);
}

.location-suggestion-item:last-child {
    border-bottom: none;
}

.location-suggestion-item .suggestion-text {
    font-size: 0.875rem;
    color: var(--ink);
}

.location-suggestion-item .suggestion-type {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 2px;
}

.plan-processing-message {
    text-align: center;
    padding: calc(var(--space-5) + var(--space-2)) var(--space-5);
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid rgba(255, 193, 7, 0.5);
    border-radius: var(--radius-md);
    margin: var(--space-5) 0;
    box-shadow: var(--shadow-sm);
}

.processing-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink-2);
    margin: 0 0 var(--space-3) 0;
}

.processing-text {
    font-size: 1rem;
    color: var(--ink-2);
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .onboarding-form-row {
        grid-template-columns: 1fr;
    }
    
    .onboarding-container {
        padding: calc(var(--space-5) + var(--space-2)) var(--space-5);
    }
    
    .onboarding-form-actions {
        flex-direction: column;
    }
    
    .onboarding-form-actions .btn {
        width: 100%;
    }
}

/* Article page helpful button styles */
.btn-helpful {
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border: 2px solid var(--pc-navy);
    border-radius: var(--radius-md);
    color: var(--pc-navy);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
}

.btn-helpful:hover {
    background: var(--surface-2);
}

.btn-helpful.active {
    background: var(--pc-navy);
    color: var(--pc-white);
}

/* Report page styles */
.report-page {
    /* Uses standard container from base.html */
}

.report-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--space-4) + var(--space-1));
    margin-bottom: calc(var(--space-4) + var(--space-1));
}

.report-form-group {
    margin-bottom: calc(var(--space-4) + var(--space-1));
}

.report-form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--ink);
}

.report-form-group input[type="date"],
.report-form-group input[type="text"],
.report-form-group textarea {
    width: 100%;
    padding: calc(var(--space-2) + var(--space-1));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    background: var(--surface);
    color: var(--ink);
}

.report-form-help {
    display: block;
    margin-top: calc(var(--space-1) + 1px);
    font-size: 0.875rem;
    color: var(--muted);
}

.report-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: calc(var(--space-2) + var(--space-1));
    margin-top: calc(var(--space-2) + var(--space-1));
}

.report-checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: normal;
    cursor: pointer;
}

.report-checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--space-5) + var(--space-1));
    padding-bottom: calc(var(--space-4) + var(--space-1));
    border-bottom: 2px solid var(--border);
}

.report-actions {
    display: flex;
    gap: calc(var(--space-2) + var(--space-1));
}

.report-section {
    margin-bottom: calc(var(--space-5) + var(--space-1));
}

.report-section h3 {
    /* Uses standard h3 styles from design system */
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
}

.report-item {
    background: var(--surface-2);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: calc(var(--space-2) + var(--space-1));
}

.report-item h4 {
    margin: 0 0 var(--space-2) 0;
    /* Uses standard h4 styles from design system */
}

.report-item p {
    margin: calc(var(--space-1) + 1px) 0;
    /* Uses standard body text styles from design system */
}

.report-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: calc(var(--space-3) + var(--space-2));
    margin-top: calc(var(--space-3) + var(--space-2));
}

.report-metric-card {
    background: var(--surface-2);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    text-align: center;
}

.report-metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--pc-navy);
    margin-bottom: calc(var(--space-1) + 1px);
}

.report-metric-label {
    font-size: 0.875rem;
    color: var(--muted);
}

.report-message {
    margin-top: calc(var(--space-4) + var(--space-1));
    padding: var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.report-message.success {
    background: var(--pc-mint);
    color: var(--pc-navy);
    border: 1px solid var(--pc-mint);
}

.report-message.error {
    background: rgba(226, 87, 68, 0.1);
    color: var(--pc-coral);
    border: 1px solid var(--pc-coral);
}

.report-form-actions {
    display: flex;
    gap: calc(var(--space-2) + var(--space-1));
    margin-top: calc(var(--space-3) + var(--space-1));
}

@media (max-width: 600px) {
    .report-form-row {
        grid-template-columns: 1fr;
    }
    
    .report-header {
        flex-direction: column;
        align-items: flex-start;
        gap: calc(var(--space-3) + var(--space-2));
    }
    
    .report-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .report-actions button {
        width: 100%;
    }
}

/* Learn topic page styles */
.topic-overview-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-overview-bullets li {
    padding: var(--space-3) 0;
    padding-left: calc(var(--space-4) + var(--space-2));
    position: relative;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

.topic-overview-bullets li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--pc-navy);
    font-weight: bold;
    font-size: 1.25rem;
}

.topic-resources-list p {
    margin-bottom: var(--space-3);
}

.topic-resources-list a {
    color: var(--pc-navy);
    text-decoration: none;
    font-weight: 500;
}

.topic-resources-list a:hover {
    text-decoration: underline;
}

/* Source Documents Grid */
.source-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: calc(var(--space-4) + var(--space-2));
}

.source-doc-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: calc(var(--space-4) + var(--space-1));
    background: var(--surface);
    transition: box-shadow 0.2s;
}

.source-doc-card:hover {
    box-shadow: var(--shadow-sm);
}

.source-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.source-doc-type-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pc-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-doc-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 var(--space-4) 0;
    line-height: 1.4;
}

.btn-download-doc {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: var(--pc-navy);
    color: var(--pc-white);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-download-doc:hover {
    background: var(--pc-blue-hover);
}

/* Multimedia Cards (videos, webinars, audio — "Different Ways to Learn") */
.assets-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-4);
}

.multimedia-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: calc(var(--space-4) + var(--space-1));
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    transition: box-shadow 0.2s;
    overflow: hidden;
}

.multimedia-card:hover {
    box-shadow: var(--shadow-sm);
}

.multimedia-thumbnail-link {
    display: block;
    width: 100%;
    margin: calc(-1 * (var(--space-4) + var(--space-1))) calc(-1 * (var(--space-4) + var(--space-1))) var(--space-3) calc(-1 * (var(--space-4) + var(--space-1)));
    text-decoration: none;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.multimedia-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    transition: transform 0.3s ease;
}

.multimedia-thumbnail-link:hover .multimedia-thumbnail {
    transform: scale(1.05);
}

.multimedia-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.multimedia-type-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pc-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--pc-mint-light, #e8f5f0);
    padding: 2px 8px;
    border-radius: 12px;
}

.multimedia-provider {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.multimedia-duration {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: auto;
}

.multimedia-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.multimedia-description {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.btn-watch-media {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: var(--pc-navy);
    color: var(--pc-white);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
    align-self: flex-start;
    margin-top: auto;
}

.btn-watch-media:hover {
    background: var(--pc-blue-hover);
}

/* Starter Questions Chips */
.starter-questions-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.question-chip {
    padding: var(--space-3) calc(var(--space-4) + var(--space-1));
    background: var(--surface);
    border: 2px solid var(--pc-navy);
    border-radius: 24px;
    color: var(--pc-navy);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.question-chip:hover {
    background: var(--pc-navy);
    color: var(--pc-white);
}

.question-chip:active {
    transform: scale(0.98);
}

/* Stacked bars */
.bars-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: calc(var(--space-3) + var(--space-1)); /* 14px */
    margin-bottom: var(--space-5);
}

.bars-grid {
    display: flex;
    gap: var(--space-1);
    align-items: flex-end;
    height: 120px;
    padding: var(--space-3) var(--space-1) var(--space-1) var(--space-1);
    overflow-x: auto;
}

.day-bar {
    width: 10px;
    min-width: 10px;
    border-radius: var(--space-1);
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column-reverse;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.day-bar:hover {
    transform: scaleY(1.1);
}

.seg {
    width: 100%;
}

.seg.move {
    background: var(--domain-move);
}

.seg.recharge {
    background: var(--domain-recharge);
}

.seg.connect {
    background: var(--domain-connect);
}

.seg.medical {
    background: var(--domain-medical);
}

.seg.adapt {
    background: var(--domain-adapt);
}

.day-tick {
    text-align: center;
    font-size: 0.625rem;
    color: var(--muted);
    margin-top: var(--space-3);
}

.bars-footnote {
    margin-top: calc(var(--space-2) + var(--space-1)); /* 10px */
    font-size: 0.75rem;
    color: var(--muted);
}

.report-btn {
    padding: var(--space-3) calc(var(--space-4) + var(--space-1)); /* 12px 20px */
    border: 2px solid var(--pc-navy);
    background: var(--surface);
    color: var(--pc-navy);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.report-btn:hover {
    background: var(--pc-navy);
    color: var(--pc-white);
}

.report-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.report-btn-primary {
    background: var(--pc-navy);
    color: var(--pc-white);
}

.report-btn-primary:hover {
    background: var(--pc-blue-hover);
}

.goals-btn {
    width: 100%;
    padding: var(--space-3) calc(var(--space-4) + var(--space-1)); /* 12px 20px */
    border: 2px solid var(--pc-navy);
    background: var(--surface);
    color: var(--pc-navy);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.goals-btn:hover {
    background: var(--pc-mint);
}

.report-section {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--border);
}

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

.report-section h4 {
    margin: 0 0 var(--space-3) 0;
    /* Uses global h4 styles */
}

.report-section p {
    margin: var(--space-2) 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.report-section ul {
    margin: var(--space-2) 0;
    padding-left: var(--space-5);
}

.report-section li {
    margin: var(--space-1) 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-3) 0;
    font-size: 0.875rem;
}

.report-table th,
.report-table td {
    padding: var(--space-2) var(--space-3);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.report-table th {
    background: var(--surface-2);
    font-weight: 600;
    color: var(--ink);
}

.report-table tr:last-child td {
    border-bottom: none;
}

.day-detail-section {
    margin-bottom: calc(var(--space-4) + var(--space-1)); /* 20px */
}

.day-detail-section h4 {
    margin: 0 0 var(--space-2) 0;
    /* Uses global h4 styles */
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--surface-2);
}

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

.stat-label {
    color: var(--muted);
}

.stat-value {
    font-weight: 600;
    color: var(--ink);
}

@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        order: -1;
    }
    
    .domain-lanes {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .momentum-row {
        grid-template-columns: 1fr;
    }
}
