/* GCSE Exam Feedback App - Redesigned Styles */
/* Design System: Dark Green + Gold + White */

/* ============================================
   ROOT VARIABLES - DESIGN SYSTEM
   ============================================ */

:root {
    /* Primary Colors - Dark Green Palette */
    --primary-dark: #0D3B2E;      /* Deep forest green */
    --primary: #1B5E4C;           /* Rich green */
    --primary-light: #2D7A66;     /* Lighter green */
    --primary-hover: #235D4F;     /* Hover state */

    /* Accent Colors - Gold Palette */
    --accent-gold: #D4AF37;       /* Classic gold */
    --accent-gold-light: #E8C75A; /* Light gold */
    --accent-bronze: #CD7F32;     /* Bronze accent */
    --accent-gold-dark: #B8975A;  /* Dark gold */

    /* Neutral Colors */
    --white: #FFFFFF;
    --background: #F9FAFB;        /* Off-white */
    --surface: #FFFFFF;           /* Pure white cards */
    --border: #E5E7EB;            /* Subtle borders */
    --border-light: #F3F4F6;      /* Very light borders */

    /* Text Colors */
    --text-primary: #1F2937;      /* Almost black */
    --text-secondary: #6B7280;    /* Medium gray */
    --text-muted: #9CA3AF;        /* Light gray */
    --text-on-dark: #FFFFFF;      /* White on dark backgrounds */

    /* Semantic Colors */
    --success: #059669;           /* Success green */
    --warning: #D97706;           /* Warning amber */
    --error: #DC2626;             /* Error red */
    --info: #1B5E4C;              /* Info (primary) */

    /* Grade Colors - Green to Gold Spectrum */
    --grade-9: #D4AF37;           /* Gold - Excellence */
    --grade-8: #B8975A;           /* Pale gold */
    --grade-7: #2D7A66;           /* Light green */
    --grade-6: #1B5E4C;           /* Primary green */
    --grade-5: #0D3B2E;           /* Dark green */
    --grade-4: #6B7280;           /* Gray */
    --grade-3: #9CA3AF;           /* Light gray */
    --grade-U: #D1D5DB;           /* Very light gray */

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-headings: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Font Sizes - 1.25 ratio scale */
    --text-xs: 0.75rem;           /* 12px */
    --text-sm: 0.875rem;          /* 14px */
    --text-base: 1rem;            /* 16px */
    --text-lg: 1.125rem;          /* 18px */
    --text-xl: 1.25rem;           /* 20px */
    --text-2xl: 1.5rem;           /* 24px */
    --text-3xl: 1.875rem;         /* 30px */
    --text-4xl: 2.25rem;          /* 36px */
    --text-5xl: 3rem;             /* 48px */
    --text-6xl: 4rem;             /* 64px */

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Spacing - 8px base unit */
    --space-1: 0.25rem;           /* 4px */
    --space-2: 0.5rem;            /* 8px */
    --space-3: 0.75rem;           /* 12px */
    --space-4: 1rem;              /* 16px */
    --space-5: 1.25rem;           /* 20px */
    --space-6: 1.5rem;            /* 24px */
    --space-8: 2rem;              /* 32px */
    --space-10: 2.5rem;           /* 40px */
    --space-12: 3rem;             /* 48px */
    --space-16: 4rem;             /* 64px */
    --space-20: 5rem;             /* 80px */

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(13, 59, 46, 0.05);
    --shadow: 0 2px 8px rgba(13, 59, 46, 0.08);
    --shadow-md: 0 4px 12px rgba(13, 59, 46, 0.1);
    --shadow-lg: 0 8px 24px rgba(13, 59, 46, 0.12);
    --shadow-xl: 0 12px 32px rgba(13, 59, 46, 0.15);
    --shadow-gold: 0 4px 16px rgba(212, 175, 55, 0.25);

    /* Border Radius */
    --radius-sm: 0.25rem;         /* 4px */
    --radius: 0.5rem;             /* 8px */
    --radius-md: 0.75rem;         /* 12px */
    --radius-lg: 1rem;            /* 16px */
    --radius-full: 9999px;        /* Circular */

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Container Widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1140px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--background);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--primary-dark);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
}

h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

h3 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--primary);
}

h4 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

p {
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

a:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

strong {
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-md {
    max-width: var(--container-md);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ============================================
   HEADER
   ============================================ */

header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-top: 4px solid var(--accent-gold);
    padding: var(--space-6) 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--white);
    margin-bottom: 0;
    letter-spacing: -0.02em;
}

nav {
    display: flex;
    gap: var(--space-6);
    align-items: center;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: var(--font-medium);
    font-size: var(--text-base);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    transition: all var(--transition-base);
}

nav a:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

nav a:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-bottom: 4px solid var(--accent-gold);
    color: var(--white);
    padding: var(--space-12) 0;
    margin-top: var(--space-20);
    text-align: center;
}

footer p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-2);
}

footer small {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    display: block;
    margin-top: var(--space-4);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

main {
    padding: var(--space-12) 0;
    min-height: calc(100vh - 400px);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-8);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: 1;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 44px;
    white-space: nowrap;
}

.btn:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    color: var(--primary-dark);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-gold);
    font-weight: var(--font-bold);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.paper-card {
    background-color: var(--surface);
    border: 2px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

.paper-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent-gold);
    border-left-width: 6px;
}

.paper-card h4 {
    color: var(--primary);
    margin-bottom: var(--space-3);
    font-size: var(--text-2xl);
}

.paper-card p {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

.topic-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

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

.topic-card h4 {
    color: var(--primary);
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.topic-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

.skill-based-topic {
    border-left: 4px solid var(--accent-gold);
    background: linear-gradient(to right, rgba(212, 175, 55, 0.05), transparent);
}

.skill-badge {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--primary-dark);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   SECTIONS
   ============================================ */

.welcome-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
    padding: var(--space-16) var(--space-8);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-12);
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--accent-gold);
}

.welcome-section h2 {
    color: var(--white);
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

.welcome-section p {
    color: rgba(255, 255, 255, 0.95);
    font-size: var(--text-lg);
    max-width: 700px;
    margin: 0 auto var(--space-4) auto;
    line-height: var(--leading-relaxed);
}

.paper-selection {
    margin-bottom: var(--space-12);
}

.paper-selection h3 {
    color: var(--primary-dark);
    margin-bottom: var(--space-6);
    font-size: var(--text-2xl);
}

.info-section {
    background-color: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
}

.info-section h3 {
    color: var(--primary);
    margin-bottom: var(--space-6);
}

.info-section ol {
    margin-left: var(--space-8);
    margin-bottom: var(--space-6);
    color: var(--text-primary);
}

.info-section li {
    margin-bottom: var(--space-3);
    padding-left: var(--space-2);
    line-height: var(--leading-relaxed);
}

.privacy-notice {
    background-color: var(--background);
    border-left: 4px solid var(--accent-gold);
    padding: var(--space-4);
    border-radius: var(--radius);
    margin-top: var(--space-6);
}

.privacy-notice p {
    margin-bottom: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.privacy-notice a {
    color: var(--primary);
    font-weight: var(--font-medium);
}

/* ============================================
   EXAM INPUT FORM
   ============================================ */

.exam-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: var(--space-8);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--accent-gold);
}

.exam-header h2 {
    color: var(--white);
    margin-bottom: var(--space-2);
}

.exam-header p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    font-size: var(--text-base);
}

.form-instructions {
    background: linear-gradient(135deg, #E8F5F1 0%, #D4EDE6 100%);
    border-left: 4px solid var(--primary);
    padding: var(--space-6);
    border-radius: var(--radius);
    margin-bottom: var(--space-8);
}

.form-instructions p {
    color: var(--primary-dark);
    margin-bottom: var(--space-3);
    font-weight: var(--font-medium);
}

.form-instructions p:last-child {
    margin-bottom: 0;
}

.questions-table {
    background-color: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

/* ============================================
   TABLES
   ============================================ */

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 10;
}

th {
    padding: var(--space-4) var(--space-4);
    text-align: left;
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    letter-spacing: 0.02em;
    border-bottom: 2px solid var(--accent-gold);
}

td {
    padding: var(--space-4) var(--space-4);
    border-bottom: 1px solid var(--border-light);
    font-size: var(--text-base);
}

tbody tr {
    transition: background-color var(--transition-fast);
}

tbody tr:nth-child(even) {
    background-color: var(--background);
}

tbody tr:hover {
    background-color: #E8F5F1;
}

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

.score-input {
    width: 80px;
    padding: var(--space-3);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    text-align: center;
    transition: all var(--transition-base);
    background-color: var(--white);
}

.score-input:hover {
    border-color: var(--primary-light);
}

.score-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 76, 0.1);
}

/* ============================================
   FORM ACTIONS
   ============================================ */

.form-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-8);
}

/* ============================================
   RESULTS PAGE
   ============================================ */

.results-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.results-header h2 {
    color: var(--primary-dark);
    font-size: var(--text-4xl);
}

.grade-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.grade-card {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
    padding: var(--space-10);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border-top: 6px solid var(--accent-gold);
    position: relative;
    overflow: hidden;
}

.grade-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.grade-card h3 {
    color: var(--white);
    font-size: var(--text-xl);
    margin-bottom: var(--space-6);
    font-weight: var(--font-medium);
}

.grade-display {
    font-size: var(--text-6xl);
    font-weight: var(--font-bold);
    margin: var(--space-4) 0;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.grade-display.grade-9,
.grade-display.grade-8 {
    color: var(--accent-gold);
    text-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
}

.score-text {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.95);
    font-weight: var(--font-medium);
    position: relative;
    z-index: 1;
}

.grade-boundaries-info {
    background-color: var(--surface);
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.grade-boundaries-info h4 {
    color: var(--primary-dark);
    margin-bottom: var(--space-6);
    font-size: var(--text-xl);
}

.boundaries-table {
    margin-top: var(--space-4);
}

.boundaries-table thead {
    background: var(--primary-dark);
}

.current-grade {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFE9B1 100%);
    font-weight: var(--font-bold);
    border-left: 4px solid var(--accent-gold);
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    color: var(--primary-dark);
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    letter-spacing: 0.02em;
}

/* ============================================
   TOPIC ANALYSIS
   ============================================ */

.topic-analysis {
    margin-bottom: var(--space-12);
}

.topic-analysis h3 {
    color: var(--primary-dark);
    margin-bottom: var(--space-6);
    font-size: var(--text-2xl);
}

.topic-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.topic-score {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.score-fraction {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--primary);
}

.score-percentage {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

.progress-bar {
    height: 12px;
    background-color: var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    margin: var(--space-4) 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent-gold) 100%);
    border-radius: var(--radius);
    transition: width 0.8s ease;
    box-shadow: 0 0 8px rgba(27, 94, 76, 0.4);
}

details {
    margin-top: var(--space-4);
    cursor: pointer;
}

summary {
    color: var(--primary);
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    user-select: none;
    padding: var(--space-2) 0;
    transition: color var(--transition-base);
}

summary:hover {
    color: var(--primary-light);
}

summary:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.question-list {
    list-style: none;
    margin-top: var(--space-3);
    padding-left: 0;
}

.question-list li {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    background-color: var(--background);
    margin-bottom: var(--space-1);
    border-radius: var(--radius-sm);
}

.question-score {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

/* ============================================
   AI FEEDBACK
   ============================================ */

.ai-feedback-section,
.ai-feedback-placeholder {
    background-color: var(--surface);
    border-left: 4px solid var(--primary);
    padding: var(--space-8);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-12);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.ai-feedback-section h3,
.ai-feedback-placeholder h3 {
    color: var(--primary-dark);
    margin-bottom: var(--space-6);
    font-size: var(--text-2xl);
}

.ai-feedback-placeholder {
    border-left-color: var(--accent-bronze);
    background: linear-gradient(135deg, #FFFBF0 0%, #FFF9E6 100%);
}

.feedback-content {
    line-height: var(--leading-loose);
    color: var(--text-primary);
    font-size: var(--text-lg);
}

.feedback-content p {
    margin-bottom: var(--space-6);
}

/* ============================================
   GENERAL ADVICE
   ============================================ */

.general-advice {
    background-color: var(--surface);
    padding: var(--space-8);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-12);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.general-advice h3 {
    color: var(--primary-dark);
    margin-bottom: var(--space-6);
}

.advice-list {
    list-style: none;
    padding-left: 0;
}

.advice-list li {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
    line-height: var(--leading-relaxed);
    position: relative;
    padding-left: var(--space-8);
}

.advice-list li::before {
    content: '✓';
    position: absolute;
    left: var(--space-4);
    color: var(--accent-gold);
    font-weight: var(--font-bold);
    font-size: var(--text-lg);
}

.advice-list li:last-child {
    border-bottom: none;
}

/* ============================================
   PRIVACY PAGE
   ============================================ */

.privacy-content {
    background-color: var(--surface);
    padding: var(--space-12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: var(--container-md);
    margin: 0 auto;
    border: 1px solid var(--border);
}

.privacy-content h2 {
    color: var(--primary-dark);
    margin-bottom: var(--space-4);
    font-size: var(--text-3xl);
}

.privacy-content h3 {
    color: var(--primary);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
    font-size: var(--text-xl);
}

.privacy-content ul {
    margin-left: var(--space-8);
    margin-bottom: var(--space-6);
}

.privacy-content li {
    margin-bottom: var(--space-3);
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .grade-summary {
        grid-template-columns: 1fr;
    }

    .topic-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }

    header .container {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    nav {
        flex-direction: column;
        gap: var(--space-3);
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    table {
        font-size: var(--text-sm);
    }

    th, td {
        padding: var(--space-3) var(--space-2);
    }

    .grade-display {
        font-size: var(--text-5xl);
    }

    .welcome-section {
        padding: var(--space-10) var(--space-6);
    }

    .privacy-content {
        padding: var(--space-6);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    header, footer, .form-actions, nav {
        display: none;
    }

    body {
        background: white;
    }

    .grade-card {
        background: white;
        color: black;
        border: 2px solid var(--primary-dark);
        box-shadow: none;
    }

    .grade-display {
        color: var(--primary-dark);
    }

    * {
        box-shadow: none !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

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

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent-gold);
    color: var(--primary-dark);
    padding: var(--space-3) var(--space-6);
    text-decoration: none;
    font-weight: var(--font-bold);
    z-index: 1000;
}

.skip-to-content:focus {
    top: 0;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
