diff --git a/README.md b/README.md
index e212f77..6bb67f2 100644
--- a/README.md
+++ b/README.md
@@ -89,8 +89,9 @@ no database, no data leaving your machine except the requests you send to Ollama
why, **three progressive hints** per step (nudge → hint → the full answer), and a **checkpoint**
built from the normal activity components and graded through `/api/grade`
- The last screen assembles the solution from the step answers, with a copy button
-- Results live in `freezmo.homework.v1` with a small history you can reopen or delete; **Make it
- again** re-runs from the stored assignment text — original files are never saved
+- Results live in `freezmo.homework.v1` — the homework screen's history and the library's
+ **Homework** tab — where you can reopen or delete them; **Make it again** re-runs from the
+ stored assignment text, and original files are never saved
- The answer and the guide are always written in the **language of the assignment**, never
translated into the interface language
@@ -116,6 +117,9 @@ no database, no data leaving your machine except the requests you send to Ollama
**Library & folders**
+- **Two pools, never mixed**: a **Study Decks** tab (the folder + card library) and a **Homework**
+ tab with saved solutions and step-by-step guides — each with its own empty state and call to
+ action, and the active tab lives in the URL (`/?tab=homework`)
- Decks saved locally with title, subject, folder, activity count, date, play count and best score
- **Folders**: create named groups ("History", "Biology", …) from the sidebar or the create screen.
New decks freeze straight into the selected folder; anything unfiled lives in **Unorganized**.
diff --git a/app/globals.css b/app/globals.css
index 9fe04c0..d2ae8e0 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -492,6 +492,28 @@ body {
background-image: linear-gradient(135deg, #38bdf8 0%, #60a5fa 100%);
color: #06111f;
}
+/* Link segments (library tabs): same control, but links navigate. */
+.segmented > a {
+ flex: 1;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: 0.375rem;
+ border-radius: 0.75rem;
+ padding: 0.42rem 0.5rem;
+ font-size: 0.875rem;
+ font-weight: 600;
+ color: var(--color-frost-700);
+ transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
+}
+.dark .segmented > a {
+ color: var(--color-frost-300);
+}
+.segmented > a[aria-current="page"] {
+ background-image: linear-gradient(135deg, #38bdf8 0%, #60a5fa 100%);
+ color: #06111f;
+ box-shadow: 0 6px 16px -8px rgb(56 189 248 / 0.7);
+}
/* Ice gradient for progress bars and selected states. */
.grad-ice {
@@ -705,7 +727,8 @@ body {
@media (max-width: 639px) {
.touch-target { min-height: 44px; min-width: 44px; }
.nav-row { min-height: 44px; }
- .segmented > button { min-height: 44px; }
+ .segmented > button,
+ .segmented > a { min-height: 44px; }
.folder-pill { min-height: 44px; }
}
diff --git a/app/homework/page.tsx b/app/homework/page.tsx
index 619a213..8930e05 100644
--- a/app/homework/page.tsx
+++ b/app/homework/page.tsx
@@ -15,7 +15,7 @@ export default async function HomeworkPage({
}: {
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}) {
- const { mode } = await searchParams;
+ const { mode, open } = await searchParams;
// The mode switch and the library quick actions deep-link into a mode; a
// link that points at the Study Deck side is handed back to /create.
if (mode === "deck") redirect("/create?mode=deck");
@@ -29,7 +29,7 @@ export default async function HomeworkPage({
- );
-}
diff --git a/components/UploadScreen.tsx b/components/UploadScreen.tsx
index df8f927..79ac846 100644
--- a/components/UploadScreen.tsx
+++ b/components/UploadScreen.tsx
@@ -33,7 +33,6 @@ import { upsertDeck } from "@/lib/storage";
import { openSettings } from "@/lib/ui-events";
import { cn, uid } from "@/lib/utils";
import { CameraIcon, FolderIcon, IceCubeIcon, PlusIcon, SnowflakeIcon, SunIcon } from "@/components/icons";
-import { ModeSwitch } from "@/components/ModeSwitch";
import { Button, ProgressBar } from "@/components/ui";
type Phase = "idle" | "preparing" | "loading" | "error";
@@ -321,9 +320,9 @@ export function UploadScreen() {
- {/* Mode switcher: a compact segmented control. This page is the Study
- Deck side; the other segment opens the homework flow. */}
-
+ {/* Dedicated flow: this page is the Study Deck uploader. Homework has
+ its own screen (/homework), reached from the library tab, the
+ drawer or the bottom bar — no mode picker here. */}
{error ? (
diff --git a/components/homework/HomeworkInput.tsx b/components/homework/HomeworkInput.tsx
index 4afb90a..44ad645 100644
--- a/components/homework/HomeworkInput.tsx
+++ b/components/homework/HomeworkInput.tsx
@@ -104,7 +104,7 @@ export function HomeworkInput({