{{ $subject->name }} @php $totalFlashcards = (int) $subject->topics->sum('flashcards_count'); $hasPractice = $totalQuestions > 0; $hasFlashcards = $totalFlashcards > 0; $hasPapers = $papers->isNotEmpty(); @endphp
Back to subjects
@include('revision.partials.page-intro', [ 'eyebrow' => 'Study Plan', 'title' => 'Start where this subject is strongest', 'description' => $hasPractice && $hasFlashcards ? 'Use questions to practise exam technique, then use flashcards to lock in key facts and quotes.' : ($hasPractice ? 'Start with question practice here. Flashcards can be added later as the subject grows.' : ($hasFlashcards ? 'Start with flashcards here. Question practice is not ready yet.' : ($hasPapers ? 'This subject currently works best through papers and mark schemes.' : 'This subject is still being prepared.'))), 'tone' => 'warm', ])
{{ $subject->icon ?: '📘' }}

{{ $subject->name }}

{{ $subject->topics->count() }} topics • {{ $totalQuestions }} questions

@if($hasPractice) Start Questions @endif @if($hasFlashcards) Start Flashcards @endif @if($hasPapers) Open Papers @endif

Best Next Step

@if($hasPractice) Question practice @elseif($hasFlashcards) Flashcard review @elseif($hasPapers) Paper walkthrough @else Content coming soon @endif

Available Now

{{ number_format($totalQuestions) }} questions • {{ number_format($totalFlashcards) }} flashcards

Exam Prep

{{ $papers->count() }} recent papers linked

@include('revision.partials.stat-card', ['label' => 'Questions Done', 'value' => $answeredQuestions, 'icon' => 'fa-solid fa-list-check']) @include('revision.partials.stat-card', ['label' => 'Accuracy', 'value' => $accuracy . '%', 'icon' => 'fa-solid fa-bullseye', 'valueClass' => $accuracy >= 70 ? 'text-green-600' : ($accuracy >= 50 ? 'text-amber-600' : 'text-red-600')]) @include('revision.partials.stat-card', ['label' => 'Remaining', 'value' => max($totalQuestions - $answeredQuestions, 0), 'icon' => 'fa-regular fa-clock']) @include('revision.partials.action-tile', [ 'href' => route('revision.study.index', ['mode' => 'practice', 'subject_id' => $subject->id]), 'title' => 'Study Questions', 'description' => $totalQuestions . ' available', 'icon' => 'fa-solid fa-file-pen', 'gradient' => 'from-brand-600 to-brand-700', 'textClass' => 'text-brand-100', ]) @include('revision.partials.action-tile', [ 'href' => route('revision.study.index', ['mode' => 'flashcards', 'subject_id' => $subject->id]), 'title' => 'Study Flashcards', 'description' => 'Review key terms', 'icon' => 'fa-solid fa-layer-group', 'gradient' => 'from-indigo-500 to-indigo-600', 'textClass' => 'text-indigo-100', ]) @include('revision.partials.action-tile', [ 'href' => route('revision.papers.index', ['subject_id' => $subject->id]), 'title' => 'Papers', 'description' => $papers->count() . ' recent shown', 'icon' => 'fa-regular fa-file-lines', 'gradient' => 'from-orange-500 to-orange-600', 'textClass' => 'text-orange-100', ])
@include('revision.partials.section-heading', [ 'title' => 'Topic Launchers', 'subtitle' => 'Start with a specific topic when you want a tighter session.', 'badge' => $subject->topics->count() . ' topics', ]) @forelse ($subject->topics as $topic) @php $topicProgress = $progressRows->firstWhere('topic_id', $topic->id); $topicAccuracy = $topicProgress && $topicProgress->questions_attempted > 0 ? (int) round(($topicProgress->questions_correct / $topicProgress->questions_attempted) * 100) : 0; @endphp

{{ $topic->name }}

{{ $topic->questions_count }} questions @if ($topic->flashcards_count > 0) • {{ $topic->flashcards_count }} flashcards @endif

{{ $topicAccuracy }}%
@include('revision.partials.progress-meter', [ 'name' => $topic->name, 'value' => $topicAccuracy, 'label' => 'Current accuracy across this topic', ])
@if($topic->questions_count > 0) Questions @endif @if($topic->flashcards_count > 0) Flashcards @endif
@empty @include('revision.partials.empty-state', [ 'title' => 'No topics available yet', 'message' => 'This subject still needs topic content before it can be studied properly.', 'icon' => 'fa-solid fa-book-open', ]) @endforelse
@if ($papers->isNotEmpty()) @include('revision.partials.section-heading', [ 'title' => 'Recent Papers', 'subtitle' => 'Open a paper or mark scheme directly from this subject.', ]) @foreach ($papers as $paper)

{{ $paper->paper_number ?: 'Paper' }} ({{ $paper->year }})

{{ strtoupper($paper->exam_board) }} • {{ ucfirst($paper->tier) }}

@if ($paper->paper_url) Paper @endif @if ($paper->mark_scheme_url) Mark Scheme @endif
@endforeach
@endif