@ondeinference / ed Mirror · read-only
Fork 0

Read-only mirror of github.com/ondeinference/ed.

Mirrored from https://github.com/ondeinference/ed.git

Synced Nov 23, 01:00 UTC

development
css 149 lines 4.19 KB
Raw
1 :root {
2 color-scheme: light dark;
3 --bg: #f6f4ef;
4 --surface: #ffffff;
5 --ink: #1d1d1b;
6 --muted: #6b6a64;
7 --line: #e2dfd6;
8 --accent: #2f5d50;
9 --accent-ink: #ffffff;
10 --user: #e9efe9;
11 --radius: 14px;
12 font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
13 }
14
15 @media (prefers-color-scheme: dark) {
16 :root {
17 --bg: #161615;
18 --surface: #1f1f1d;
19 --ink: #ecebe6;
20 --muted: #9a998f;
21 --line: #2f2f2b;
22 --accent: #7fb3a2;
23 --accent-ink: #10201b;
24 --user: #25302b;
25 }
26 }
27
28 * { box-sizing: border-box; }
29
30 body {
31 margin: 0;
32 min-height: 100dvh;
33 background: var(--bg);
34 color: var(--ink);
35 line-height: 1.5;
36 }
37
38 main {
39 max-width: 42rem;
40 margin: 0 auto;
41 padding: 2.5rem 1.25rem 1.5rem;
42 min-height: 100dvh;
43 display: flex;
44 flex-direction: column;
45 gap: 1.5rem;
46 }
47
48 h1 { margin: 0; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
49 h2 { margin: 0 0 0.5rem; font-size: 1.05rem; font-weight: 600; }
50 .tagline { margin: 0.25rem 0 0; color: var(--muted); }
51
52 .card {
53 background: var(--surface);
54 border: 1px solid var(--line);
55 border-radius: var(--radius);
56 padding: 1.25rem;
57 }
58 .card p { margin: 0 0 1rem; color: var(--muted); }
59
60 button {
61 font: inherit;
62 border: 0;
63 border-radius: 999px;
64 padding: 0.55rem 1.1rem;
65 background: var(--accent);
66 color: var(--accent-ink);
67 cursor: pointer;
68 }
69 button:disabled { opacity: 0.5; cursor: default; }
70 button:focus-visible, textarea:focus-visible, #transcript:focus-visible {
71 outline: 2px solid var(--accent);
72 outline-offset: 2px;
73 }
74 button.link {
75 background: none;
76 color: var(--muted);
77 padding: 0.25rem 0.4rem;
78 text-decoration: underline;
79 text-underline-offset: 3px;
80 }
81 #stop { background: transparent; color: var(--ink); border: 1px solid var(--line); }
82
83 progress { width: 100%; height: 0.5rem; accent-color: var(--accent); }
84 #progress-label { margin: 0.5rem 0 0; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
85
86 #chat { flex: 1; display: flex; flex-direction: column; gap: 0.75rem; min-height: 0; }
87 #transcript {
88 flex: 1;
89 overflow-y: auto;
90 display: flex;
91 flex-direction: column;
92 gap: 0.75rem;
93 padding: 0.25rem 0;
94 }
95 .bubble {
96 max-width: 85%;
97 padding: 0.65rem 0.95rem;
98 border-radius: var(--radius);
99 white-space: pre-wrap;
100 overflow-wrap: anywhere;
101 }
102 .bubble.user { align-self: flex-end; background: var(--user); }
103 .bubble.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); }
104 .bubble.error { color: #b3261e; }
105 .bubble.pending::after { content: "▍"; margin-left: 1px; opacity: 0.6; }
106
107 #composer { display: flex; gap: 0.5rem; align-items: flex-end; }
108 textarea {
109 flex: 1;
110 font: inherit;
111 color: inherit;
112 resize: none;
113 max-height: 10rem;
114 padding: 0.65rem 0.9rem;
115 border-radius: var(--radius);
116 border: 1px solid var(--line);
117 background: var(--surface);
118 }
119
120 footer { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.8125rem; }
121 .spacer { flex: 1; }
122 .byline { margin: 0; text-align: center; color: var(--muted); font-size: 0.8125rem; }
123 .byline a { color: inherit; text-underline-offset: 3px; }
124 #stats { font-variant-numeric: tabular-nums; }
125
126 .visually-hidden {
127 position: absolute; width: 1px; height: 1px; overflow: hidden;
128 clip: rect(0 0 0 0); white-space: nowrap;
129 }
130
131 @media (prefers-reduced-motion: no-preference) {
132 .bubble.pending::after { animation: blink 1s steps(2, start) infinite; }
133 @keyframes blink { to { visibility: hidden; } }
134 }
135
136 [hidden] { display: none !important; }
137
138 /* Phone and tablet warning */
139 .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
140 .card .promo { border-top: 1px solid var(--line); padding-top: 1rem; margin-bottom: 0.75rem; }
141 .promo strong { color: var(--ink); font-weight: 600; }
142 .store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
143 .store-badges a { display: inline-flex; border-radius: 8px; }
144 .store-badges a[hidden] { display: none; }
145 .store-badges img { display: block; height: 44px; width: auto; }
146 .card .more-apps { margin: 0.75rem 0 0; font-size: 0.875rem; }
147 .more-apps a { color: var(--muted); text-underline-offset: 3px; }
148 #try-anyway { margin-left: -0.4rem; }
149 .card .promo > p:first-child { margin-bottom: 0.75rem; }