Skip to content
refs
174 lines · 10.5 KBRaw
1@import "@refs/design-system/styles.css";
2@source "./";
3
4.landing ::selection { background: var(--accent-tint); }
5
6.landing :is(a, button, input):focus-visible {
7 outline: 2px solid var(--accent-hover);
8 outline-offset: 4px;
9}
10
11.landing input { caret-color: var(--accent-hover); }
12
13.landing ::-webkit-scrollbar { height: 6px; }
14.landing ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
15
16.landing-globe {
17 mask-image:
18 radial-gradient(ellipse 34% 26% at 50% 30%, rgb(0 0 0 / 0.12), rgb(0 0 0 / 0.55) 65%, #000 100%),
19 linear-gradient(to bottom, transparent, #000 18%, #000 85%, transparent);
20 mask-composite: intersect;
21}
22
23@media (max-width: 767px) {
24 .landing-globe {
25 mask-image:
26 radial-gradient(ellipse 70% 30% at 50% 28%, rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.5) 65%, #000 100%),
27 linear-gradient(to bottom, transparent, #000 15%, #000 88%, transparent);
28 }
29}
30
31@keyframes landing-pop {
32 from { opacity: 0; transform: scale(0.6); }
33 to { opacity: 1; }
34}
35
36@keyframes landing-fade { from { opacity: 0; } }
37
38@keyframes landing-ping {
39 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--needs) 55%, transparent); }
40 100% { box-shadow: 0 0 0 8px transparent; }
41}
42
43.landing .landing-fade { animation: landing-fade 400ms var(--ease-out) both; }
44
45@media (prefers-reduced-motion: no-preference) {
46 .landing .landing-pop { animation: landing-pop 360ms var(--ease-out) both; }
47 .landing .landing-ping { animation: landing-ping 1.4s ease-out infinite; }
48}
49
50@keyframes scroll-reveal {
51 from { opacity: 0; transform: translateY(32px) scale(0.98); }
52 to { opacity: 1; transform: none; }
53}
54
55@keyframes scroll-fade { from { opacity: 0; } to { opacity: 1; } }
56
57@supports (animation-timeline: view()) {
58 .landing .scroll-reveal { animation: scroll-reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
59 @media (prefers-reduced-motion: reduce) {
60 .landing .scroll-reveal { animation-name: scroll-fade; }
61 }
62}
63
64@keyframes record-write {
65 from { opacity: 0.001; clip-path: inset(0 100% 0 0); filter: blur(2px); }
66 to { opacity: 1; clip-path: inset(0 0 0 0); filter: blur(0); }
67}
68
69@media (prefers-reduced-motion: no-preference) {
70 .landing .live-decision { animation: record-write 600ms var(--ease-out) both; }
71}
72
73
74@keyframes fanout-in {
75 from { opacity: 0; transform: translateY(6px); filter: blur(2px); }
76 to { opacity: 1; transform: none; filter: blur(0); }
77}
78
79@keyframes fanout-up {
80 from { top: 100%; opacity: 0; }
81 20% { opacity: 1; }
82 to { top: -4px; opacity: 1; }
83}
84
85@keyframes fanout-down {
86 from { top: -4px; opacity: 0; }
87 20% { opacity: 1; }
88 to { top: 100%; opacity: 1; }
89}
90
91@keyframes fanout-ping {
92 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--sage) 45%, transparent); }
93 100% { box-shadow: 0 0 0 10px transparent; }
94}
95
96@media (prefers-reduced-motion: no-preference) {
97 .landing .landing-fanout-in { animation: fanout-in 500ms var(--ease-out) both; }
98 .landing .landing-fanout-up { animation: fanout-up 900ms var(--ease-out) both; }
99 .landing .landing-fanout-down { animation: fanout-down 900ms var(--ease-out) both; }
100 .landing .landing-fanout-card.is-pinged { animation: fanout-ping 900ms var(--ease-out) 600ms both; }
101 .landing .landing-fanout-card { transition: box-shadow 200ms var(--ease-out); }
102}
103
104/*
105 * Code map. One canvas from folders down to code: the level of detail follows the zoom, and labels grow
106 * as the map shrinks (`--inv` is 1 / scale), so they stay readable at every level.
107 */
108.code-map { background-image: radial-gradient(var(--hairline) 1px, transparent 1.2px); background-size: 22px 22px; }
109.code-map-world { --inv: 1; }
110
111.code-map-node { border-radius: var(--radius-control); contain: layout style; }
112/* Blocks off screen skip layout and paint, so a change of level only draws what the reader can see. */
113.code-map-node:is([data-role="code"], [data-role="file"]) { content-visibility: auto; contain-intrinsic-size: auto 200px; }
114.code-map-node[data-role="folder"] { border-radius: var(--radius-sheet); background: color-mix(in oklab, var(--ink) 2%, transparent); box-shadow: inset 0 0 0 1px var(--hairline); }
115.code-map-node[data-role="file"] { border-radius: var(--radius-panel); background: var(--ground); box-shadow: var(--elevation-card); }
116.code-map-node[data-role="class"] { background: var(--sunken); box-shadow: inset 0 0 0 1px var(--hairline); }
117.code-map-node[data-role="code"] { overflow: hidden; cursor: pointer; background: var(--panel); box-shadow: var(--elevation-card); }
118.code-map-node[data-role="code"]:hover { box-shadow: 0 0 0 1px var(--line); }
119.code-map-node[data-role="folder"] { cursor: zoom-in; }
120.code-map-node:is([data-role="file"], [data-role="class"]) { cursor: pointer; }
121.code-map-node:is([data-role="file"], [data-role="class"]):hover { box-shadow: 0 0 0 1px var(--line), var(--elevation-card); }
122
123.code-map-head { position: absolute; inset-inline: 10px; top: 7px; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; pointer-events: none; }
124.code-map-node[data-role="folder"] > .code-map-head { inset-inline: 16px; top: 13px; }
125.code-map-name { overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink); letter-spacing: 0; }
126.code-map-node[data-role="folder"] > .code-map-head .code-map-name { color: var(--muted); }
127.code-map-kind { flex: none; height: 18px; padding: 0 6px; border-radius: var(--radius-chip); background: var(--hover); color: var(--muted); font-size: var(--text-xs); font-weight: 500; line-height: 18px; letter-spacing: 0; }
128.code-map-meta { display: none; position: absolute; left: 12px; white-space: nowrap; color: var(--faint); letter-spacing: 0; pointer-events: none; }
129.code-map-code { position: absolute; inset-inline: 0; margin: 0; padding: 0 10px; overflow: hidden; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); white-space: pre; letter-spacing: 0; }
130.code-map-code [data-added] { background: var(--success-tint); color: var(--ink); }
131
132.code-map-diff { --sc: min(var(--inv), 2.5); position: absolute; top: -10px; right: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: var(--radius-chip); background: var(--raised); box-shadow: var(--elevation-control); font: 500 var(--text-xs) var(--font-mono); white-space: nowrap; transform: scale(var(--sc)); transform-origin: 100% 0; pointer-events: none; }
133.code-map-node[data-role="file"] > .code-map-diff { --sc: var(--inv); }
134.code-map-node[data-role="folder"] > .code-map-diff { display: none; }
135.code-map-station { position: absolute; top: -10px; right: -10px; z-index: 3; width: 22px; height: 22px; border-radius: 9999px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--porcelain); color: var(--ink); font: 600 var(--text-xs) / 22px var(--font-sans); text-align: center; font-variant-numeric: tabular-nums; transform: scale(var(--inv)); transform-origin: 100% 0; pointer-events: none; }
136.code-map-node[data-active] > .code-map-station { box-shadow: inset 0 0 0 3.5px var(--porcelain); }
137.code-map-node[data-traced] { box-shadow: 0 0 0 2px var(--porcelain); }
138.code-map-node[data-active], .code-map-node[data-current] { box-shadow: 0 0 0 2px var(--porcelain), 0 0 0 7px color-mix(in oklab, var(--porcelain) 20%, transparent); }
139
140.code-map[data-level="architecture"] .code-map-node:is([data-role="code"], [data-role="class"]),
141.code-map[data-level="architecture"] .code-map-kind,
142.code-map[data-level="package"] .code-map-node:not([data-role="code"]) > .code-map-head .code-map-kind,
143.code-map:is([data-level="architecture"], [data-level="package"]) .code-map-code { display: none; }
144.code-map:is([data-level="architecture"], [data-level="package"]) .code-map-node:is([data-role="folder"], [data-role="file"]) > :is(.code-map-head, .code-map-diff) { display: none; }
145.code-map[data-level="architecture"] .code-map-node[data-holds][data-role="file"] { box-shadow: 0 0 0 2px var(--porcelain); }
146.code-map[data-level="package"] .code-map-node[data-role="code"] > .code-map-head .code-map-kind { display: none; }
147.code-map[data-level="package"] .code-map-node[data-role="code"] > .code-map-head .code-map-name { font-size: calc(var(--text-xs) * min(var(--inv), 2.2)); }
148.code-map[data-level="module"] .code-map-code { opacity: 0.3; }
149.code-map[data-level="module"] .code-map-node[data-role="code"] > .code-map-head .code-map-name { font-size: calc(var(--text-xs) * min(var(--inv), 1.6)); }
150
151.code-map-review .code-map-node[data-status="none"] { opacity: 0.35; }
152.code-map-review .code-map-node:is([data-role="file"], [data-role="code"]):is([data-status="changed"], [data-status="added"]):not([data-traced], [data-current]) { box-shadow: 0 0 0 1.5px var(--ink), var(--elevation-card); }
153.code-map-review .code-map-node[data-role="folder"]:is([data-status="changed"], [data-status="added"]) > .code-map-head .code-map-name { color: var(--ink); }
154
155/* Zoomed out, blocks are too small for their shadow rings, and painting 1,000 rings made a change of level slow. */
156.code-map:is([data-level="architecture"], [data-level="package"]) .code-map-node:is([data-role="code"], [data-role="file"]) { box-shadow: inset 0 0 0 1px var(--hairline); }
157
158/* While the map moves to another level, a light sweeps it, after a short wait so a fast move shows nothing. */
159.code-map-settling { opacity: 0; animation: code-map-settling 1ms 150ms forwards; }
160@keyframes code-map-settling { to { opacity: 1; } }
161
162/* A name in a code card that the reader can follow to its definition. */
163.code-map-ref { padding: 0; border: 0; border-radius: 4px; background: none; font: inherit; color: var(--token-dark, inherit); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.22em; cursor: pointer; transition: text-decoration-color 150ms ease, background-color 150ms ease; }
164:root[data-mode="light"] .code-map-ref { color: var(--token-light, inherit); }
165.code-map-ref:hover { background: var(--hover); text-decoration-color: currentColor; }
166.code-map-ref[data-next] { background: var(--hover); text-decoration: none; box-shadow: 0 0 0 1.5px var(--porcelain); }
167@media (prefers-contrast: more) { .code-map-ref { text-decoration-color: currentColor; } }
168
169/* Docs headings link to themselves, so a reader can copy the address of a section. */
170.docs-article :is(h2, h3) { scroll-margin-top: 76px; }
171.docs-article :is(h2, h3) > a { color: inherit; text-decoration: none; }
172.docs-article :is(h2, h3) > a:hover { text-decoration: underline; text-decoration-color: var(--line); }
173.docs-article { max-width: 78ch; }
174.docs-article table { display: block; overflow-x: auto; }