Add the V2 web app: design system, shell, study flows, AI, settings, sharing
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
eae109c166
commit
74a98ac1f1
52 changed files with 11976 additions and 1 deletions
497
web/src/styles.css
Normal file
497
web/src/styles.css
Normal file
|
|
@ -0,0 +1,497 @@
|
|||
@import 'tailwindcss';
|
||||
@source inline("tab-{cobalt,teal,moss,amber,coral,rose,plum,slate}");
|
||||
@import '@fontsource-variable/instrument-sans';
|
||||
@import '@fontsource-variable/newsreader';
|
||||
@import '@fontsource-variable/newsreader/wght-italic.css';
|
||||
@import '@fontsource-variable/jetbrains-mono';
|
||||
|
||||
/*
|
||||
* Study Desk design language: "paper, ink and highlighter".
|
||||
* Warm paper surfaces, near-black ink, one cobalt accent for anything interactive,
|
||||
* and a highlighter yellow reserved for the few things that deserve emphasis.
|
||||
* Serif (Newsreader) carries content you read and think about; sans carries controls.
|
||||
*/
|
||||
|
||||
:root {
|
||||
--paper: #fbfaf7;
|
||||
--surface: #ffffff;
|
||||
--sunken: #f3f1eb;
|
||||
--line: #e7e3d9;
|
||||
--line-strong: #d3cec1;
|
||||
--ink: #1b1a17;
|
||||
--ink-2: #57534a;
|
||||
--ink-3: #8b867a;
|
||||
--accent: #2747d8;
|
||||
--accent-hover: #1c37b5;
|
||||
--accent-ink: #ffffff;
|
||||
--accent-soft: #e9edfc;
|
||||
--marker: #ffe36e;
|
||||
--marker-ink: #1b1a17;
|
||||
--good: #1c7a4b;
|
||||
--good-soft: #e2f3e9;
|
||||
--bad: #c0362c;
|
||||
--bad-soft: #fbe8e5;
|
||||
--warn: #9a5b07;
|
||||
--warn-soft: #fbefd9;
|
||||
--shadow-1: 0 1px 2px rgb(27 26 23 / 0.05), 0 1px 1px rgb(27 26 23 / 0.03);
|
||||
--shadow-2: 0 4px 14px -4px rgb(27 26 23 / 0.1), 0 2px 4px -2px rgb(27 26 23 / 0.06);
|
||||
--shadow-3: 0 24px 60px -16px rgb(27 26 23 / 0.28), 0 8px 20px -8px rgb(27 26 23 / 0.14);
|
||||
|
||||
--c-cobalt: #2747d8;
|
||||
--c-teal: #0d7f86;
|
||||
--c-moss: #4f7a28;
|
||||
--c-amber: #b7790b;
|
||||
--c-coral: #d6552f;
|
||||
--c-rose: #c2386e;
|
||||
--c-plum: #7a45c2;
|
||||
--c-slate: #5d6673;
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
:root[data-theme='dark'] {
|
||||
--paper: #151412;
|
||||
--surface: #1d1c19;
|
||||
--sunken: #100f0e;
|
||||
--line: #2f2d28;
|
||||
--line-strong: #46423a;
|
||||
--ink: #f3f0e9;
|
||||
--ink-2: #bcb7ab;
|
||||
--ink-3: #8a857a;
|
||||
--accent: #91a6ff;
|
||||
--accent-hover: #adbdff;
|
||||
--accent-ink: #0f1430;
|
||||
--accent-soft: #222949;
|
||||
--marker: #e9cb4b;
|
||||
--marker-ink: #1b1a17;
|
||||
--good: #5fc795;
|
||||
--good-soft: #15301f;
|
||||
--bad: #f1867d;
|
||||
--bad-soft: #3a1c19;
|
||||
--warn: #e5a94f;
|
||||
--warn-soft: #382911;
|
||||
--shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
|
||||
--shadow-2: 0 6px 18px -6px rgb(0 0 0 / 0.6);
|
||||
--shadow-3: 0 28px 70px -18px rgb(0 0 0 / 0.8);
|
||||
|
||||
--c-cobalt: #91a6ff;
|
||||
--c-teal: #4cc3c9;
|
||||
--c-moss: #9cc76d;
|
||||
--c-amber: #e8b44e;
|
||||
--c-coral: #f58a66;
|
||||
--c-rose: #f07ea9;
|
||||
--c-plum: #b893f2;
|
||||
--c-slate: #a0a9b6;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--color-paper: var(--paper);
|
||||
--color-surface: var(--surface);
|
||||
--color-sunken: var(--sunken);
|
||||
--color-line: var(--line);
|
||||
--color-line-strong: var(--line-strong);
|
||||
--color-ink: var(--ink);
|
||||
--color-ink-2: var(--ink-2);
|
||||
--color-ink-3: var(--ink-3);
|
||||
--color-accent: var(--accent);
|
||||
--color-accent-hover: var(--accent-hover);
|
||||
--color-accent-ink: var(--accent-ink);
|
||||
--color-accent-soft: var(--accent-soft);
|
||||
--color-marker: var(--marker);
|
||||
--color-marker-ink: var(--marker-ink);
|
||||
--color-good: var(--good);
|
||||
--color-good-soft: var(--good-soft);
|
||||
--color-bad: var(--bad);
|
||||
--color-bad-soft: var(--bad-soft);
|
||||
--color-warn: var(--warn);
|
||||
--color-warn-soft: var(--warn-soft);
|
||||
--color-tab: var(--tab, var(--c-cobalt));
|
||||
|
||||
--font-sans: 'Instrument Sans Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
|
||||
--font-serif: 'Newsreader Variable', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
|
||||
--font-mono: 'JetBrains Mono Variable', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
|
||||
|
||||
--shadow-1: var(--shadow-1);
|
||||
--shadow-2: var(--shadow-2);
|
||||
--shadow-3: var(--shadow-3);
|
||||
|
||||
--radius-card: 14px;
|
||||
--radius-control: 9px;
|
||||
|
||||
--animate-in: sd-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
--animate-pop: sd-pop 160ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
|
||||
--animate-fade: sd-fade 140ms ease-out;
|
||||
--animate-sheet: sd-sheet 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
--animate-drawer: sd-drawer 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
--animate-shimmer: sd-shimmer 1.4s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes sd-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(6px);
|
||||
}
|
||||
}
|
||||
@keyframes sd-pop {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
@keyframes sd-fade {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
@keyframes sd-sheet {
|
||||
from {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
@keyframes sd-drawer {
|
||||
from {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
@keyframes sd-shimmer {
|
||||
to {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
html {
|
||||
font-family: var(--font-sans);
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-feature-settings: 'ss01', 'cv05';
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
body {
|
||||
min-height: 100dvh;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
#root {
|
||||
min-height: 100dvh;
|
||||
}
|
||||
::selection {
|
||||
background: var(--marker);
|
||||
color: var(--marker-ink);
|
||||
}
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
button,
|
||||
[role='button'],
|
||||
summary,
|
||||
label[for],
|
||||
select {
|
||||
cursor: pointer;
|
||||
}
|
||||
button:disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
text-wrap: balance;
|
||||
}
|
||||
p {
|
||||
text-wrap: pretty;
|
||||
}
|
||||
input::placeholder,
|
||||
textarea::placeholder {
|
||||
color: var(--ink-3);
|
||||
}
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--line-strong) transparent;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
animation-duration: 0.001ms !important;
|
||||
transition-duration: 0.001ms !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
/* Display type: serif, tight, slightly optical-size aware. */
|
||||
.display {
|
||||
font-family: var(--font-serif);
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.015em;
|
||||
line-height: 1.12;
|
||||
font-variation-settings: 'opsz' 40;
|
||||
}
|
||||
.reading {
|
||||
font-family: var(--font-serif);
|
||||
font-size: 1.125rem;
|
||||
line-height: 1.6;
|
||||
font-variation-settings: 'opsz' 16;
|
||||
}
|
||||
.eyebrow {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.09em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-3);
|
||||
}
|
||||
.num {
|
||||
font-family: var(--font-mono);
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
/* Highlighter swipe behind a word or number. */
|
||||
.marker {
|
||||
background: linear-gradient(transparent 52%, var(--marker) 52%, var(--marker) 92%, transparent 92%);
|
||||
color: inherit;
|
||||
padding: 0 0.12em;
|
||||
margin: 0 -0.12em;
|
||||
border-radius: 2px;
|
||||
}
|
||||
:root[data-theme='dark'] .marker {
|
||||
background: linear-gradient(transparent 58%, color-mix(in srgb, var(--marker) 42%, transparent) 58%, color-mix(in srgb, var(--marker) 42%, transparent) 94%, transparent 94%);
|
||||
}
|
||||
.card {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius-card);
|
||||
box-shadow: var(--shadow-1);
|
||||
}
|
||||
.skeleton {
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(90deg, var(--sunken) 0%, color-mix(in srgb, var(--sunken) 55%, var(--surface)) 50%, var(--sunken) 100%);
|
||||
background-size: 200% 100%;
|
||||
animation: var(--animate-shimmer);
|
||||
}
|
||||
.kbd {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 11px;
|
||||
line-height: 1;
|
||||
padding: 3px 5px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid var(--line-strong);
|
||||
border-bottom-width: 2px;
|
||||
background: var(--surface);
|
||||
color: var(--ink-2);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Rendered Markdown (questions, cards, notes, assistant). */
|
||||
.md {
|
||||
line-height: 1.6;
|
||||
}
|
||||
.md > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.md > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.md p {
|
||||
margin: 0.65em 0;
|
||||
}
|
||||
.md h1,
|
||||
.md h2,
|
||||
.md h3,
|
||||
.md h4 {
|
||||
font-family: var(--font-serif);
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
margin: 1.4em 0 0.5em;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.md h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.md h2 {
|
||||
font-size: 1.32em;
|
||||
padding-bottom: 0.25em;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.md h3 {
|
||||
font-size: 1.14em;
|
||||
}
|
||||
.md h4 {
|
||||
font-size: 1em;
|
||||
}
|
||||
.md ul,
|
||||
.md ol {
|
||||
margin: 0.6em 0;
|
||||
padding-left: 1.4em;
|
||||
}
|
||||
.md ul {
|
||||
list-style: disc;
|
||||
}
|
||||
.md ol {
|
||||
list-style: decimal;
|
||||
}
|
||||
.md li {
|
||||
margin: 0.22em 0;
|
||||
}
|
||||
.md li::marker {
|
||||
color: var(--ink-3);
|
||||
}
|
||||
.md strong {
|
||||
font-weight: 650;
|
||||
}
|
||||
.md a {
|
||||
color: var(--accent);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
.md code {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.88em;
|
||||
background: var(--sunken);
|
||||
padding: 0.12em 0.36em;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.md pre {
|
||||
background: var(--sunken);
|
||||
border: 1px solid var(--line);
|
||||
padding: 0.8em 1em;
|
||||
border-radius: 10px;
|
||||
overflow-x: auto;
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
.md pre code {
|
||||
background: none;
|
||||
padding: 0;
|
||||
}
|
||||
.md blockquote {
|
||||
border-left: 3px solid var(--line-strong);
|
||||
padding-left: 0.9em;
|
||||
color: var(--ink-2);
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
.md hr {
|
||||
border: 0;
|
||||
border-top: 1px solid var(--line);
|
||||
margin: 1.4em 0;
|
||||
}
|
||||
.md img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: 8px;
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
.md .table-wrap {
|
||||
overflow-x: auto;
|
||||
margin: 0.8em 0;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 10px;
|
||||
}
|
||||
.md table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-family: var(--font-sans);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.md th,
|
||||
.md td {
|
||||
text-align: left;
|
||||
padding: 0.5em 0.75em;
|
||||
border-bottom: 1px solid var(--line);
|
||||
vertical-align: top;
|
||||
}
|
||||
.md tr:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
.md th {
|
||||
background: var(--sunken);
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.md mark {
|
||||
background: var(--marker);
|
||||
color: var(--marker-ink);
|
||||
padding: 0 0.15em;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* Flashcard flip */
|
||||
.flip {
|
||||
perspective: 1600px;
|
||||
}
|
||||
.flip-inner {
|
||||
display: grid;
|
||||
transform-style: preserve-3d;
|
||||
transition: transform 420ms cubic-bezier(0.3, 0.8, 0.3, 1);
|
||||
}
|
||||
.flip-inner[data-flipped='true'] {
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
.flip-face {
|
||||
grid-area: 1 / 1;
|
||||
backface-visibility: hidden;
|
||||
-webkit-backface-visibility: hidden;
|
||||
}
|
||||
.flip-back {
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
/* Hidden face must not be reachable by keyboard or screen reader. */
|
||||
.flip-inner[data-flipped='true'] .flip-front,
|
||||
.flip-inner[data-flipped='false'] .flip-back {
|
||||
visibility: hidden;
|
||||
transition: visibility 0s linear 210ms;
|
||||
}
|
||||
.flip-inner[data-flipped='false'] .flip-front,
|
||||
.flip-inner[data-flipped='true'] .flip-back {
|
||||
visibility: visible;
|
||||
transition: visibility 0s linear 210ms;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.flip-inner {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@utility tab-cobalt {
|
||||
--tab: var(--c-cobalt);
|
||||
}
|
||||
@utility tab-teal {
|
||||
--tab: var(--c-teal);
|
||||
}
|
||||
@utility tab-moss {
|
||||
--tab: var(--c-moss);
|
||||
}
|
||||
@utility tab-amber {
|
||||
--tab: var(--c-amber);
|
||||
}
|
||||
@utility tab-coral {
|
||||
--tab: var(--c-coral);
|
||||
}
|
||||
@utility tab-rose {
|
||||
--tab: var(--c-rose);
|
||||
}
|
||||
@utility tab-plum {
|
||||
--tab: var(--c-plum);
|
||||
}
|
||||
@utility tab-slate {
|
||||
--tab: var(--c-slate);
|
||||
}
|
||||
@utility safe-bottom {
|
||||
padding-bottom: max(env(safe-area-inset-bottom), 0px);
|
||||
}
|
||||
|
||||
@media print {
|
||||
.no-print {
|
||||
display: none !important;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue