Match grant pages to the live Oficina sign-in door

The consent and connections pages now reuse id.oficina.works' actual
look: the suite sky, a white rounded card, the gradient Oficina mark
beside the wordmark, and its primary button. CSS (theme, sky, brand and
door rules) and the mark and sky artwork are copied into grant/static and
served from a closed list under /static/. CSP gains img-src 'self'.
Wording and behaviour are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev a9810cf64f9a7b58f2873cdd7ae5f93bb99087a3 parent 202371f
9 files changed, +277 −84
  • grant/manage.go +1 −1
  • grant/redirect_test.go +8 −0
  • grant/server.go +38 −12
  • grant/static/brand/icon.svg +1 −0
  • grant/static/grant.css +227 −71
  • grant/static/sky/filaments.svg +1 −0
  • grant/static/sky/grain.svg +1 −0
  • grant/static/sky/placeholder-dark.png binary
  • grant/static/sky/placeholder-light.png binary

CI passed — run details

CI log
=== ci ===
go vet ./...
go test -race ./...
ok  	amadan.net/oficina/agent-access.git	(cached)
ok  	amadan.net/oficina/agent-access.git/client	(cached)
?   	amadan.net/oficina/agent-access.git/cmd/oficina	[no test files]
ok  	amadan.net/oficina/agent-access.git/cmd/oficina-connect	5.527s
ok  	amadan.net/oficina/agent-access.git/connection	1.383s
ok  	amadan.net/oficina/agent-access.git/grant	1.792s
diff --git a/grant/manage.go b/grant/manage.go
index e116a2a..cfbd034 100644
--- a/grant/manage.go
+++ b/grant/manage.go
@@ -129,4 +129,4 @@ func (s *Server) disconnect(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/connections", 303)
}
-var connectionsPage = template.Must(template.New("connections").Parse(pageHead + `<title>Oficina connections</title><main>` + brandMark + `<h1>Your connections</h1><p>Connected clients can act within the permissions you approved and your current app access. Disconnecting stops future requests across all apps.</p>{{range .Connections}}<section><h2>{{.Client}}</h2><p>Teams: {{range .Teams}}{{.}} {{end}}</p><ul>{{range .Scopes}}<li>{{.}}</li>{{end}}</ul><p>Expires {{.Expires.Format "2 January 2006"}}</p><form method="post" action="/connections/revoke"><input type="hidden" name="ticket" value="{{$.Ticket}}"><input type="hidden" name="id" value="{{.ID}}"><button>Disconnect {{.Client}}</button></form></section>{{else}}<p>You have no active connections. Connect from your agent app or the Oficina CLI.</p>{{end}}</main></html>`))
+var connectionsPage = template.Must(template.New("connections").Parse(pageHead + `<title>Oficina connections</title>` + doorOpen + `<h1>Your connections</h1><p>Connected clients can act within the permissions you approved and your current app access. Disconnecting stops future requests across all apps.</p>{{range .Connections}}<section><h2>{{.Client}}</h2><p>Teams: {{range .Teams}}{{.}} {{end}}</p><ul>{{range .Scopes}}<li>{{.}}</li>{{end}}</ul><p>Expires {{.Expires.Format "2 January 2006"}}</p><form method="post" action="/connections/revoke"><input type="hidden" name="ticket" value="{{$.Ticket}}"><input type="hidden" name="id" value="{{.ID}}"><button>Disconnect {{.Client}}</button></form></section>{{else}}<p>You have no active connections. Connect from your agent app or the Oficina CLI.</p>{{end}}` + doorClose))
diff --git a/grant/redirect_test.go b/grant/redirect_test.go
index 292fb16..10f634a 100644
--- a/grant/redirect_test.go
+++ b/grant/redirect_test.go
@@ -95,6 +95,14 @@ func TestConsentPageIsStyledWithUnchangedWords(t *testing.T) {
if !strings.Contains(body, `value="acme" checked`) {
t.Fatal("the only team is not pre-selected")
}
+ for _, asset := range []string{"/static/brand/icon.svg", "/static/sky/grain.svg", "/static/sky/filaments.svg", "/static/sky/placeholder-light.png"} {
+ if r, _ := get(t, ts, ts.URL+asset, ""); r.StatusCode != 200 || !strings.Contains(csp, "img-src 'self'") {
+ t.Fatalf("asset %s: %d", asset, r.StatusCode)
+ }
+ }
+ if r, _ := get(t, ts, ts.URL+"/static/../server.go", ""); r.StatusCode == 200 {
+ t.Fatal("served a file outside the closed list")
+ }
css, cssBody := get(t, ts, ts.URL+"/static/grant.css", "")
if css.StatusCode != 200 || !strings.HasPrefix(css.Header.Get("Content-Type"), "text/css") || !strings.Contains(cssBody, "system-ui") {
t.Fatalf("stylesheet %d %s", css.StatusCode, css.Header.Get("Content-Type"))
diff --git a/grant/server.go b/grant/server.go
index dee33e1..b80f86a 100644
--- a/grant/server.go
+++ b/grant/server.go
@@ -6,7 +6,7 @@ import (
"crypto/cipher"
"crypto/rand"
"crypto/subtle"
- _ "embed"
+ "embed"
"encoding/base64"
"encoding/json"
"errors"
@@ -153,10 +153,7 @@ func (s *Server) Handler() http.Handler {
mux.HandleFunc("GET /.well-known/oauth-protected-resource", s.resourceMetadata)
mux.HandleFunc("GET /oauth/authorize", s.authorize)
mux.HandleFunc("POST /oauth/authorize", s.approve)
- mux.HandleFunc("GET /static/grant.css", func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "text/css; charset=utf-8")
- _, _ = w.Write(grantCSS)
- })
+ mux.HandleFunc("GET /static/{name...}", serveStatic)
mux.HandleFunc("POST /oauth/token", s.token)
mux.HandleFunc("POST /oauth/revoke", s.revoke)
mux.HandleFunc("POST /api/v1/credential", s.credential)
@@ -208,7 +205,7 @@ func single(values url.Values) bool {
}
// pageCSP lets the grant pages load their own stylesheet and nothing else.
-const pageCSP = "default-src 'none'; style-src 'self'; form-action 'self'; frame-ancestors 'none'; base-uri 'none'"
+const pageCSP = "default-src 'none'; style-src 'self'; img-src 'self'; form-action 'self'; frame-ancestors 'none'; base-uri 'none'"
// refuse sends a trusted client back to its registered redirect with an OAuth
// error. Callers must have validated the client and redirect already.
@@ -302,14 +299,43 @@ func (s *Server) authorize(w http.ResponseWriter, r *http.Request) {
_ = consent.Execute(w, map[string]any{"Client": client.Name, "Ticket": encoded, "Teams": teams, "Only": len(teams) == 1, "Scopes": labels})
}
-//go:embed static/grant.css
-var grantCSS []byte
+//go:embed static
+var staticFS embed.FS
+
+// staticTypes is the closed list of files served under /static/.
+var staticTypes = map[string]string{
+ "grant.css": "text/css; charset=utf-8",
+ "brand/icon.svg": "image/svg+xml",
+ "sky/grain.svg": "image/svg+xml",
+ "sky/filaments.svg": "image/svg+xml",
+ "sky/placeholder-light.png": "image/png",
+ "sky/placeholder-dark.png": "image/png",
+}
+
+func serveStatic(w http.ResponseWriter, r *http.Request) {
+ name := r.PathValue("name")
+ kind, ok := staticTypes[name]
+ if !ok {
+ http.NotFound(w, r)
+ return
+ }
+ body, err := staticFS.ReadFile("static/" + name)
+ if err != nil {
+ http.NotFound(w, r)
+ return
+ }
+ w.Header().Set("Content-Type", kind)
+ _, _ = w.Write(body)
+}
-// pageHead and brandMark give every grant page the sign-in card look.
-const pageHead = `<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/static/grant.css">`
-const brandMark = `<p class="brand"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-hidden="true"><rect width="1024" height="1024" fill="#303642"/><g transform="translate(153.6 153.6) scale(29.8667)" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M9 21V9"/></g></svg>Oficina</p>`
+// pageHead and doorOpen give every grant page Oficina's sign-in door: the
+// suite sky, one white card, the app mark and the wordmark. They are the
+// same rules and artwork id.oficina.works serves.
+const pageHead = `<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" type="image/svg+xml" href="/static/brand/icon.svg"><link rel="stylesheet" href="/static/grant.css">`
+const doorOpen = `<main><div estilo-door estilo-sky-host><div estilo-sky aria-hidden="true"><img estilo-sky-layer="placeholder" estilo-sky-tone="light" src="/static/sky/placeholder-light.png" alt=""><img estilo-sky-layer="placeholder" estilo-sky-tone="dark" src="/static/sky/placeholder-dark.png" alt=""><img estilo-sky-layer="grain" src="/static/sky/grain.svg" alt=""><img estilo-sky-layer="filaments" src="/static/sky/filaments.svg" alt=""></div><section estilo-signin><p estilo-brand><img estilo-brand-icon="listing" src="/static/brand/icon.svg" alt="" width="36" height="36"><span>Oficina</span></p>`
+const doorClose = `</section></div></main></html>`
-var consent = template.Must(template.New("consent").Parse(pageHead + `<title>Connect to Oficina</title><main>` + brandMark + `<h1>Connect {{.Client}} to Oficina</h1><p>This client will receive the content it reads and can act within the permissions you approve.</p><ul>{{range .Scopes}}<li>{{.}}</li>{{end}}</ul><form method="post" action="/oauth/authorize"><input type="hidden" name="ticket" value="{{.Ticket}}"><fieldset><legend>Choose teams</legend>{{range .Teams}}<label><input type="checkbox" name="team" value="{{.ID}}"{{if $.Only}} checked{{end}}>{{.Name}}</label>{{end}}</fieldset><div class="actions"><button name="decision" value="approve">Allow access</button><button name="decision" value="deny">Cancel</button></div></form></main></html>`))
+var consent = template.Must(template.New("consent").Parse(pageHead + `<title>Connect to Oficina</title>` + doorOpen + `<h1>Connect {{.Client}} to Oficina</h1><p>This client will receive the content it reads and can act within the permissions you approve.</p><ul>{{range .Scopes}}<li>{{.}}</li>{{end}}</ul><form method="post" action="/oauth/authorize"><input type="hidden" name="ticket" value="{{.Ticket}}"><fieldset><legend>Choose teams</legend>{{range .Teams}}<label><input type="checkbox" name="team" value="{{.ID}}"{{if $.Only}} checked{{end}}>{{.Name}}</label>{{end}}</fieldset><div class="actions"><button name="decision" value="approve">Allow access</button><button name="decision" value="deny">Cancel</button></div></form>` + doorClose))
func (s *Server) approve(w http.ResponseWriter, r *http.Request) {
if len(r.Header.Values("Origin")) != 1 || r.Header.Get("Origin") != s.cfg.Origin {
diff --git a/grant/static/brand/icon.svg b/grant/static/brand/icon.svg
new file mode 100644
index 0000000..7cb7482
--- /dev/null
+++ b/grant/static/brand/icon.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 100 100" role="img" aria-label="Oficina"><title>Oficina</title><defs><clipPath id="s"><path d="M96.00 50.00L95.97 64.13L95.90 68.64L95.77 71.90L95.60 74.54L95.37 76.79L95.09 78.76L94.75 80.51L94.37 82.10L93.92 83.54L93.43 84.86L92.87 86.07L92.26 87.19L91.59 88.22L90.85 89.17L90.05 90.05L89.17 90.85L88.22 91.59L87.19 92.26L86.07 92.87L84.86 93.43L83.54 93.92L82.10 94.37L80.51 94.75L78.76 95.09L76.79 95.37L74.54 95.60L71.90 95.77L68.64 95.90L64.13 95.97L50.00 96.00L35.87 95.97L31.36 95.90L28.10 95.77L25.46 95.60L23.21 95.37L21.24 95.09L19.49 94.75L17.90 94.37L16.46 93.92L15.14 93.43L13.93 92.87L12.81 92.26L11.78 91.59L10.83 90.85L9.95 90.05L9.15 89.17L8.41 88.22L7.74 87.19L7.13 86.07L6.57 84.86L6.08 83.54L5.63 82.10L5.25 80.51L4.91 78.76L4.63 76.79L4.40 74.54L4.23 71.90L4.10 68.64L4.03 64.13L4.00 50.00L4.03 35.87L4.10 31.36L4.23 28.10L4.40 25.46L4.63 23.21L4.91 21.24L5.25 19.49L5.63 17.90L6.08 16.46L6.57 15.14L7.13 13.93L7.74 12.81L8.41 11.78L9.15 10.83L9.95 9.95L10.83 9.15L11.78 8.41L12.81 7.74L13.93 7.13L15.14 6.57L16.46 6.08L17.90 5.63L19.49 5.25L21.24 4.91L23.21 4.63L25.46 4.40L28.10 4.23L31.36 4.10L35.87 4.03L50.00 4.00L64.13 4.03L68.64 4.10L71.90 4.23L74.54 4.40L76.79 4.63L78.76 4.91L80.51 5.25L82.10 5.63L83.54 6.08L84.86 6.57L86.07 7.13L87.19 7.74L88.22 8.41L89.17 9.15L90.05 9.95L90.85 10.83L91.59 11.78L92.26 12.81L92.87 13.93L93.43 15.14L93.92 16.46L94.37 17.90L94.75 19.49L95.09 21.24L95.37 23.21L95.60 25.46L95.77 28.10L95.90 31.36L95.97 35.87Z"/></clipPath><radialGradient id="c"><stop offset="0" stop-color="#fff" stop-opacity=".24"/><stop offset=".6" stop-color="#fff" stop-opacity="0"/></radialGradient><linearGradient id="l" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".18"/><stop offset=".5" stop-color="#fff" stop-opacity="0"/></linearGradient><filter id="b" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="3"/></filter></defs><g clip-path="url(#s)"><g filter="url(#b)"><path d="M4 104L-34.71 -51.25L-32.31 -51.83Z" fill="#ae8a09"/><path d="M4 104L-32.48 -51.79L-30.07 -52.33Z" fill="#ab8c01"/><path d="M4 104L-30.25 -52.29L-27.83 -52.80Z" fill="#a78e04"/><path d="M4 104L-28.01 -52.76L-25.59 -53.24Z" fill="#a39009"/><path d="M4 104L-25.77 -53.21L-23.34 -53.65Z" fill="#9f9107"/><path d="M4 104L-23.52 -53.62L-21.08 -54.02Z" fill="#9b9306"/><path d="M4 104L-21.26 -53.99L-18.82 -54.36Z" fill="#979508"/><path d="M4 104L-19.00 -54.34L-16.55 -54.67Z" fill="#929703"/><path d="M4 104L-16.73 -54.65L-14.28 -54.95Z" fill="#8d990a"/><path d="M4 104L-14.46 -54.93L-12.00 -55.20Z" fill="#889a17"/><path d="M4 104L-12.18 -55.18L-9.72 -55.41Z" fill="#829c21"/><path d="M4 104L-9.91 -55.39L-7.44 -55.59Z" fill="#7c9d29"/><path d="M4 104L-7.63 -55.58L-5.16 -55.74Z" fill="#769f30"/><path d="M4 104L-5.34 -55.73L-2.87 -55.85Z" fill="#70a037"/><path d="M4 104L-3.06 -55.84L-0.59 -55.93Z" fill="#69a23e"/><path d="M4 104L-0.77 -55.93L1.70 -55.98Z" fill="#62a344"/><path d="M4 104L1.52 -55.98L3.99 -56.00Z" fill="#5ba44a"/><path d="M4 104L3.81 -56.00L6.28 -55.98Z" fill="#54a54f"/><path d="M4 104L6.09 -55.99L8.57 -55.93Z" fill="#4ea654"/><path d="M4 104L8.38 -55.94L10.85 -55.85Z" fill="#47a659"/><path d="M4 104L10.67 -55.86L13.14 -55.74Z" fill="#3fa75d"/><path d="M4 104L12.95 -55.75L15.42 -55.59Z" fill="#36a862"/><path d="M4 104L15.24 -55.60L17.70 -55.41Z" fill="#2ca867"/><path d="M4 104L17.52 -55.43L19.98 -55.20Z" fill="#20a96b"/><path d="M4 104L19.80 -55.22L22.26 -54.96Z" fill="#0ca970"/><path d="M4 104L22.07 -54.98L24.53 -54.68Z" fill="#03a975"/><path d="M4 104L24.35 -54.70L26.79 -54.37Z" fill="#0aa87a"/><path d="M4 104L26.61 -54.39L29.06 -54.03Z" fill="#09a87f"/><path d="M4 104L28.88 -54.05L31.31 -53.65Z" fill="#0ba783"/><path d="M4 104L31.13 -53.68L33.57 -53.24Z" fill="#03a787"/><path d="M4 104L33.39 -53.28L35.81 -52.81Z" fill="#0ba78b"/><path d="M4 104L35.63 -52.84L38.05 -52.33Z" fill="#08a68e"/><path d="M4 104L37.87 -52.37L40.28 -51.83Z" fill="#07a692"/><path d="M4 104L40.11 -51.87L42.51 -51.30Z" fill="#08a695"/><path d="M4 104L42.33 -51.34L44.73 -50.73Z" fill="#0ba598"/><path d="M4 104L44.55 -50.78L46.93 -50.13Z" fill="#02a59b"/><path d="M4 104L46.76 -50.18L49.13 -49.50Z" fill="#09a49e"/><path d="M4 104L48.96 -49.55L51.33 -48.84Z" fill="#03a4a1"/><path d="M4 104L51.15 -48.89L53.51 -48.15Z" fill="#0ea3a4"/><path d="M4 104L53.33 -48.20L55.68 -47.42Z" fill="#0ca3a6"/><path d="M4 104L55.50 -47.48L57.84 -46.67Z" fill="#0ba3a9"/><path d="M4 104L57.66 -46.73L59.99 -45.88Z" fill="#0ca2ac"/><path d="M4 104L59.82 -45.95L62.12 -45.07Z" fill="#00a2af"/><path d="M4 104L61.95 -45.14L64.25 -44.22Z" fill="#04a2b2"/><path d="M4 104L64.08 -44.29L66.36 -43.35Z" fill="#0ba1b4"/><path d="M4 104L66.20 -43.42L68.47 -42.44Z" fill="#04a1b8"/><path d="M4 104L68.30 -42.51L70.55 -41.50Z" fill="#0da0ba"/><path d="M4 104L70.39 -41.58L72.63 -40.53Z" fill="#0a9fbd"/><path d="M4 104L72.46 -40.61L74.69 -39.54Z" fill="#099fc0"/><path d="M4 104L74.52 -39.62L76.73 -38.51Z" fill="#0b9ec3"/><path d="M4 104L76.57 -38.60L78.76 -37.46Z" fill="#039ec7"/><path d="M4 104L78.60 -37.54L80.78 -36.37Z" fill="#0a9dcb"/><path d="M4 104L80.62 -36.46L82.78 -35.26Z" fill="#089ccf"/><path d="M4 104L82.62 -35.35L84.76 -34.12Z" fill="#099bd3"/><path d="M4 104L84.60 -34.21L86.73 -32.95Z" fill="#029ad8"/><path d="M4 104L86.57 -33.05L88.68 -31.76Z" fill="#0099dd"/><path d="M4 104L88.52 -31.85L90.61 -30.53Z" fill="#1a98de"/><path d="M4 104L90.46 -30.63L92.53 -29.28Z" fill="#2897e0"/><path d="M4 104L92.37 -29.38L94.42 -28.00Z" fill="#3295e2"/><path d="M4 104L94.27 -28.10L96.30 -26.69Z" fill="#3b94e3"/><path d="M4 104L96.15 -26.80L98.16 -25.36Z" fill="#4392e4"/><path d="M4 104L98.01 -25.47L100.00 -24.00Z" fill="#4a91e5"/><path d="M4 104L99.86 -24.11L101.82 -22.61Z" fill="#5190e6"/><path d="M4 104L101.68 -22.72L103.62 -21.20Z" fill="#578ee6"/><path d="M4 104L103.48 -21.31L105.40 -19.76Z" fill="#5d8de7"/><path d="M4 104L105.26 -19.88L107.16 -18.30Z" fill="#628be7"/><path d="M4 104L107.02 -18.42L108.90 -16.81Z" fill="#678ae7"/><path d="M4 104L108.76 -16.93L110.62 -15.30Z" fill="#6c88e7"/><path d="M4 104L110.48 -15.42L112.32 -13.76Z" fill="#7187e7"/><path d="M4 104L112.18 -13.89L113.99 -12.20Z" fill="#7686e6"/><path d="M4 104L113.86 -12.33L115.64 -10.62Z" fill="#7a84e6"/><path d="M4 104L115.51 -10.74L117.27 -9.01Z" fill="#7e83e5"/><path d="M4 104L117.14 -9.14L118.87 -7.38Z" fill="#8282e4"/><path d="M4 104L118.74 -7.51L120.45 -5.72Z" fill="#8780e3"/><path d="M4 104L120.33 -5.86L122.01 -4.05Z" fill="#8a7fe2"/><path d="M4 104L121.89 -4.18L123.54 -2.35Z" fill="#8e7ee1"/><path d="M4 104L123.42 -2.48L125.05 -0.63Z" fill="#927cdf"/><path d="M4 104L124.93 -0.76L126.54 1.12Z" fill="#967bde"/><path d="M4 104L126.42 0.98L127.99 2.88Z" fill="#997adc"/><path d="M4 104L127.88 2.74L129.43 4.66Z" fill="#9d78da"/><path d="M4 104L129.31 4.52L130.84 6.47Z" fill="#a077d8"/><path d="M4 104L130.72 6.32L132.22 8.29Z" fill="#a376d6"/><path d="M4 104L132.11 8.14L133.57 10.13Z" fill="#a675d3"/><path d="M4 104L133.47 9.99L134.90 12.00Z" fill="#aa74d1"/><path d="M4 104L134.80 11.85L136.20 13.88Z" fill="#ad73ce"/><path d="M4 104L136.10 13.73L137.48 15.78Z" fill="#af71cc"/><path d="M4 104L137.38 15.63L138.73 17.70Z" fill="#b270c9"/><path d="M4 104L138.63 17.54L139.95 19.63Z" fill="#b56fc6"/><path d="M4 104L139.85 19.48L141.14 21.58Z" fill="#b86ec3"/><path d="M4 104L141.05 21.43L142.31 23.55Z" fill="#ba6dc0"/><path d="M4 104L142.21 23.40L143.44 25.54Z" fill="#bd6cbd"/><path d="M4 104L143.35 25.38L144.55 27.54Z" fill="#bf6cb9"/><path d="M4 104L144.46 27.38L145.63 29.56Z" fill="#c16bb6"/><path d="M4 104L145.54 29.40L146.68 31.59Z" fill="#c36ab3"/><path d="M4 104L146.60 31.43L147.70 33.64Z" fill="#c569af"/><path d="M4 104L147.62 33.48L148.69 35.70Z" fill="#c769ab"/><path d="M4 104L148.61 35.54L149.65 37.78Z" fill="#c968a8"/><path d="M4 104L149.58 37.61L150.59 39.87Z" fill="#cb67a4"/><path d="M4 104L150.51 39.70L151.49 41.97Z" fill="#cd67a1"/><path d="M4 104L151.42 41.80L152.36 44.09Z" fill="#ce669d"/><path d="M4 104L152.29 43.92L153.20 46.22Z" fill="#d06699"/><path d="M4 104L153.14 46.05L154.01 48.36Z" fill="#d16695"/><path d="M4 104L153.95 48.18L154.79 50.51Z" fill="#d26592"/><path d="M4 104L154.73 50.34L155.54 52.67Z" fill="#d3658e"/><path d="M4 104L155.48 52.50L156.26 54.84Z" fill="#d4658a"/><path d="M4 104L156.20 54.67L156.95 57.02Z" fill="#d56586"/><path d="M4 104L156.89 56.85L157.60 59.22Z" fill="#d66582"/><path d="M4 104L157.55 59.04L158.23 61.42Z" fill="#d7657e"/><path d="M4 104L158.18 61.24L158.82 63.63Z" fill="#d8657a"/><path d="M4 104L158.78 63.45L159.38 65.85Z" fill="#d86576"/><path d="M4 104L159.34 65.67L159.91 68.07Z" fill="#d96572"/><path d="M4 104L159.87 67.89L160.41 70.31Z" fill="#d9666e"/><path d="M4 104L160.37 70.13L160.88 72.55Z" fill="#d9666a"/><path d="M4 104L160.84 72.37L161.31 74.79Z" fill="#d96666"/><path d="M4 104L161.28 74.61L161.71 77.05Z" fill="#d96762"/><path d="M4 104L161.68 76.87L162.08 79.30Z" fill="#d9675e"/><path d="M4 104L162.05 79.12L162.42 81.57Z" fill="#d9685a"/><path d="M4 104L162.39 81.39L162.72 83.84Z" fill="#d96956"/><path d="M4 104L162.70 83.65L163.00 86.11Z" fill="#d96952"/><path d="M4 104L162.98 85.93L163.24 88.38Z" fill="#d86a4d"/><path d="M4 104L163.22 88.20L163.44 90.66Z" fill="#d86b49"/><path d="M4 104L163.43 90.48L163.62 92.94Z" fill="#d76c45"/><path d="M4 104L163.60 92.76L163.76 95.23Z" fill="#d66d41"/><path d="M4 104L163.75 95.05L163.87 97.51Z" fill="#d66e3c"/><path d="M4 104L163.86 97.33L163.94 99.80Z" fill="#d56f38"/><path d="M4 104L163.94 99.62L163.99 102.09Z" fill="#d47033"/><path d="M4 104L163.99 101.91L164.00 104.38Z" fill="#d3712e"/><path d="M4 104L164.00 104.19L163.98 106.67Z" fill="#d17329"/><path d="M4 104L163.98 106.48L163.92 108.95Z" fill="#d07424"/><path d="M4 104L163.93 108.77L163.84 111.24Z" fill="#cf751e"/><path d="M4 104L163.84 111.06L163.72 113.52Z" fill="#ce7618"/><path d="M4 104L163.73 113.34L163.56 115.81Z" fill="#cc7810"/><path d="M4 104L163.58 115.63L163.38 118.09Z" fill="#cb7906"/><path d="M4 104L163.39 117.91L163.16 120.37Z" fill="#c87b05"/><path d="M4 104L163.18 120.18L162.91 122.64Z" fill="#c67c04"/><path d="M4 104L162.93 122.46L162.63 124.91Z" fill="#c37e05"/><path d="M4 104L162.65 124.73L162.31 127.18Z" fill="#c18007"/><path d="M4 104L162.34 127.00L161.96 129.44Z" fill="#bf8100"/><path d="M4 104L161.99 129.26L161.58 131.70Z" fill="#bc8204"/><path d="M4 104L161.62 131.52L161.17 133.95Z" fill="#ba8409"/><path d="M4 104L161.21 133.77L160.73 136.19Z" fill="#b88505"/><path d="M4 104L160.76 136.01L160.25 138.43Z" fill="#b58602"/><path d="M4 104L160.29 138.25L159.74 140.66Z" fill="#b38800"/><path d="M4 104L159.79 140.48L159.20 142.89Z" fill="#b08909"/></g><rect width="100" height="100" fill="url(#c)"/><rect width="100" height="100" fill="url(#l)"/></g><rect x="30.62" y="23.78" width="45.60" height="36.48" rx="7.98" fill="#fff" opacity=".55"/><rect x="22.64" y="36.32" width="50.16" height="38.76" rx="7.98" fill="#fff"/></svg>
diff --git a/grant/static/grant.css b/grant/static/grant.css
index 022e9bb..e3050f8 100644
--- a/grant/static/grant.css
+++ b/grant/static/grant.css
@@ -1,85 +1,241 @@
-/* Oficina grant pages: the sign-in card look. Tokens follow estilo's theme. */
:root {
color-scheme: light dark;
- --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
- --page: light-dark(#eef3fe, #0e1118);
- --card: light-dark(#ffffff, #1a1f26);
- --line: light-dark(#e5e7eb, #2a3038);
- --line-strong: light-dark(#7f8792, #79828e);
- --text: light-dark(#1a1d21, #e8eaed);
- --muted: light-dark(#4b5563, #a8b0ba);
- --accent: light-dark(#2464e0, #7ba7ff);
- --accent-strong: light-dark(#1a4fc0, #a3c0ff);
- --on-accent: light-dark(#ffffff, #0b1220);
- --soft: light-dark(#f6f7f8, #15191f);
+
+ /* Type: the family only. Sizes and spacing stay in tokens.css. The
+ system UI face, nothing downloaded: Paul, 2026-10-25 (AGENTS.md row
+ 9). A webfont cannot render in WebKit without a frame of invisible
+ text, and the chrome never flashes. TestChromeFontIsSystemUI. */
+ --rst-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+
+ /* Shape: soft and exact. */
+ --rst-radius: 12px;
+ --rst-radius-sm: 8px;
+ --rst-radius-pill: 999px;
+
+ /* Surfaces and lines: a cool off-white page, white cards, a sunk grey. */
+ --rst-bg: light-dark(#f5f6f8, #15171c);
+ --rst-surface: light-dark(#ffffff, #1c1f26);
+ --rst-surface-2: light-dark(#eceef2, #23262e);
+ --rst-line: light-dark(#e3e6eb, #2d313a);
+ --rst-line-strong: light-dark(#7f8591, #7a818e);
+
+ /* The page header's rule: the accent folded into the line, as day. */
+ --rst-header-rule: color-mix(in oklab, var(--rst-accent) 18%, var(--rst-line));
+
+ /* Text */
+ --rst-text: light-dark(#262a33, #eceef2);
+ --rst-text-muted: light-dark(#565c69, #b4bac6);
+ --rst-text-faint: light-dark(#626875, #8f96a3);
+
+ /* Accent: Oficina's, hue 262 on the ring (apps.go). Each app
+ re-declares these four. */
+ --rst-accent: light-dark(#2e5bb4, #87b1fd);
+ --rst-accent-strong: light-dark(#214a9b, #afcbfe);
+ --rst-accent-soft: light-dark(#e9f1ff, #1f2b42);
+ --rst-on-accent: light-dark(#ffffff, #111418);
+
+ /* Status tones: day's, unchanged. */
+ --rst-tone-neutral-fg: light-dark(#374151, #c3c9d1);
+ --rst-tone-neutral-bg: light-dark(#eef0f2, #262c34);
+ --rst-tone-positive-fg: light-dark(#166534, #6ee7a8);
+ --rst-tone-positive-bg: light-dark(#dcfce7, #10281c);
+ --rst-tone-warning-fg: light-dark(#854d0e, #f0c46a);
+ --rst-tone-warning-bg: light-dark(#fef3c7, #2c2110);
+ --rst-tone-negative-fg: light-dark(#b91c1c, #f79aa0);
+ --rst-tone-negative-bg: light-dark(#fee2e2, #331819);
+
+ /* Depth: a long, low, cool shadow; paper lifted, not stacked. */
+ --rst-shadow-pop: 0 18px 44px -14px light-dark(rgba(20, 24, 33, 0.28), rgba(0, 0, 0, 0.6));
+ --rst-shadow-knob: 0 1px 2px rgba(20, 24, 33, 0.3);
+ --rst-shadow-lift: 0 1px 1px rgba(20, 24, 33, 0.04), 0 14px 36px -14px light-dark(rgba(20, 24, 33, 0.22), rgba(0, 0, 0, 0.55));
+ --rst-overlay: light-dark(rgba(20, 24, 33, 0.45), rgba(0, 0, 0, 0.6));
}
-* { box-sizing: border-box; }
-html { background: var(--page); }
-body {
- margin: 0;
- min-height: 100dvh;
- display: flex;
- align-items: flex-start;
- justify-content: center;
- padding: 1rem;
- font: 1rem/1.5 var(--font);
- color: var(--text);
- background: linear-gradient(180deg, var(--page), light-dark(#e3ebfb, #121826));
+
+/* The whole toggle. Setting color-scheme re-resolves every light-dark()
+ above, so an explicit choice beats the OS in both directions without
+ restating a colour. */
+:root[data-theme="light"] { color-scheme: light; }
+:root[data-theme="dark"] { color-scheme: dark; }
+
+/* estilo-sky — Calma's ambient nebula (sky.go). Quiet by default:
+ --estilo-sky-strength is one number for the whole effect.
+
+ Placement is the host's: [estilo-sky-host] is a positioned, clipped box,
+ and a stacking context of its own, so the sky (z-index -1) paints above
+ the host's background and beneath everything else in it, without
+ touching how the host's other children are positioned — a sticky bar
+ stays sticky. Move the sky with --estilo-sky-top and
+ --estilo-sky-height, and set --estilo-sky-strength (0.5, Quiet) on the
+ host or anywhere above it. */
+[estilo-sky-host] {
+ position: relative;
+ overflow: hidden;
+ isolation: isolate;
+}
+
+[estilo-sky] {
+ position: absolute;
+ inset-inline: 0;
+ top: var(--estilo-sky-top, -6%);
+ height: var(--estilo-sky-height, 80%);
+ pointer-events: none;
+ z-index: -1;
+}
+
+/* Each layer overhangs the box so a drift never shows an edge, and fades
+ in and out vertically so the sky has no top or bottom. */
+[estilo-sky] img {
+ position: absolute;
+ left: -8%;
+ top: -12%;
+ width: 116%;
+ height: 124%;
+ max-width: none;
+ opacity: calc(var(--estilo-sky-strength, 0.5) * var(--estilo-sky-gain, 1) * var(--estilo-sky-k, 1));
+ -webkit-mask-image: linear-gradient(#0000, #000 22%, #000 58%, #0000 92%);
+ mask-image: linear-gradient(#0000, #000 22%, #000 58%, #0000 92%);
+ user-select: none;
}
-main {
- width: 100%;
- max-width: 26rem;
- margin-block: max(1rem, 6vh);
- padding: 1.5rem 1.25rem;
- background: var(--card);
- border: 1px solid var(--line);
- border-radius: 12px;
- box-shadow: 0 8px 24px light-dark(rgba(36, 60, 120, .10), rgba(0, 0, 0, .5));
+/* The sky's colour is the placeholder: the haze and clouds computed into a
+ few pixels and inlined, so it is there in the first frame (placeholder.go
+ has the measurements against the full SVG drawing: 3/255 light, 8/255
+ dark). Stretched to cover as an SVG's xMidYMid slice would, and softened
+ so no pixel grid shows. The haze and clouds SVGs it replaced were
+ drawing almost nothing on top of it, so they are no longer linked
+ (impeccable's detector, 2026-09-29). Over it, two SVG layers carry what
+ a few pixels cannot: the clouds' grain — faint light and dark specks that
+ average to nothing — and the filaments. No script. */
+[estilo-sky] img { object-fit: cover; }
+[estilo-sky-layer="placeholder"] { filter: blur(24px); }
+[estilo-sky-layer="grain"] { --estilo-sky-k: 1; }
+/* The weights haze and clouds had when they were linked, kept for a page
+ cached from then that still names them. */
+[estilo-sky-layer="haze"] { --estilo-sky-k: 0.175; }
+[estilo-sky-layer="clouds"] { --estilo-sky-k: 0.25; }
+[estilo-sky-layer="filaments"] { --estilo-sky-k: 1.3; }
+
+/* One placeholder per scheme; show the one that matches. An explicit
+ Appearance choice ([data-theme]) beats the OS, as it does for estilo's
+ theme. Both are inline, so neither costs a request. */
+[estilo-sky-tone="dark"] { display: none; --estilo-sky-gain: 1.55; }
+:root[data-theme="dark"] [estilo-sky-tone="light"] { display: none; }
+:root[data-theme="dark"] [estilo-sky-tone="dark"] { display: block; }
+@media (prefers-color-scheme: dark) {
+ :root:not([data-theme="light"]) [estilo-sky-tone="light"] { display: none; }
+ :root:not([data-theme="light"]) [estilo-sky-tone="dark"] { display: block; }
}
-.brand { color: var(--text); display: flex; align-items: center; gap: .625rem; margin: 0 0 1.25rem; font-weight: 650; font-size: 1.125rem; letter-spacing: -.01em; }
-.brand svg { width: 2rem; height: 2rem; border-radius: 21%; flex-shrink: 0; }
-h1 { margin: 0 0 .75rem; font-size: 1.375rem; line-height: 1.25; letter-spacing: -.01em; }
-h2 { margin: 0 0 .5rem; font-size: 1.0625rem; }
-p { margin: 0 0 1rem; color: var(--muted); }
-ul { margin: 0 0 1.25rem; padding-left: 1.25rem; }
-li { margin-block: .25rem; }
-fieldset { margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
-legend { padding: 0; margin-bottom: .5rem; font-weight: 600; }
-label {
- display: flex;
+
+/* Drifting: the sky breathes, the grain with it, and the filaments
+ slide. Slow enough to notice only if you look. */
+@media (prefers-reduced-motion: no-preference) {
+ [estilo-sky-layer="placeholder"], [estilo-sky-layer="grain"] { animation: estilo-sky-breathe-near 64s ease-in-out infinite alternate; }
+ [estilo-sky-layer="filaments"] { animation: estilo-sky-drift 80s ease-in-out infinite alternate; }
+}
+@keyframes estilo-sky-breathe-near { to { transform: translate(-3%, 1.5%) scale(1.06); } }
+@keyframes estilo-sky-drift { to { transform: translate(-4%, 1%); } }
+
+/* Oficina brand artwork. Source: oficina/estilo brand/. The icons carry
+ their own squircle and transparent corners, so nothing here rounds them. */
+[estilo-brand] {
+ display: inline-flex;
align-items: center;
- gap: .75rem;
- min-height: 2.75rem;
- padding: .5rem .75rem;
- margin-bottom: .5rem;
- border: 1px solid var(--line-strong);
- border-radius: 8px;
- cursor: pointer;
+ gap: .5rem;
+ min-block-size: 24px;
+}
+[estilo-brand-icon] {
+ display: inline-block;
+ flex-shrink: 0;
+ inline-size: 1.75rem;
+ block-size: 1.75rem;
+ vertical-align: middle;
+}
+[estilo-brand-icon="listing"] {
+ inline-size: 2.5rem;
+ block-size: 2.5rem;
}
-label:has(input:checked) { border-color: var(--accent); background: var(--soft); }
-input[type=checkbox] { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
-button {
- font: inherit;
- font-weight: 600;
- min-height: 2.75rem;
- padding: .5rem 1rem;
- border-radius: 8px;
- border: 1px solid var(--line-strong);
- background: transparent;
- color: var(--text);
- cursor: pointer;
+
+/* Sign-in, check-your-email and signed-out pages: the Oficina door. The
+ suite's sky behind (estilo sky.css places and animates it), one card on
+ it with the app's mark and name at its head — the same door Home draws
+ at id.oficina.works, in the app's own colour. The door spans the page
+ whatever the app's layout gives it, so the sky is never boxed in. */
+:root:has([estilo-door]) { overflow-x: clip; --rst-scrollbar-gutter: auto; scrollbar-gutter: auto; }
+[estilo-door] {
+ box-sizing: border-box;
+ margin-inline: calc(50% - 50vw);
+ padding: max(40px, 9vh) var(--rst-sp-4) var(--rst-sp-6);
+ min-block-size: 680px;
+ /* The whole sky lies inside the door, fading in and out, so the door's
+ edges never cut it: under an app's bar there is no page top to hide
+ an edge behind, as there is on Home. A sky's layers overhang its box
+ by 12% above and below (sky.css), and fade in over their first 22%
+ and out from 58% to 92% — so a 560px sky placed 67px down starts
+ transparent at the door's top and has faded out by 640px. */
+ --estilo-sky-top: 67px;
+ --estilo-sky-height: 560px;
}
-button:hover { background: var(--soft); }
-button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
-button[value=approve] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
-button[value=approve]:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
+[estilo-signin] {
+ box-sizing: border-box;
+ max-inline-size: 460px;
+ margin: 0 auto;
+ padding: 34px 40px 32px;
+ background: var(--rst-surface);
+ border-radius: 20px;
+ box-shadow: 0 0 0 1px light-dark(transparent, var(--rst-line)), var(--rst-shadow-lift);
+}
+[estilo-signin] > [estilo-brand] { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
+[estilo-signin] > [estilo-brand] [estilo-brand-icon] { inline-size: 36px; block-size: 36px; }
+[estilo-signin] h1 { margin: 0; font-size: 1.75rem; font-weight: 620; letter-spacing: -0.02em; line-height: 1.15; }
+[estilo-signin-lede] { margin: 0.5rem 0 var(--rst-sp-4); color: var(--rst-text-muted); }
+[estilo-signin] > h1 + :not([estilo-signin-lede]) { margin-block-start: var(--rst-sp-4); }
+[estilo-signin-form] { max-inline-size: none; margin-block-start: var(--rst-sp-4); }
+[estilo-signin-body] { margin: var(--rst-sp-4) 0; }
+@media (max-width: 520px) {
+ [estilo-door] { padding-inline: 14px; padding-block-start: 28px; }
+ [estilo-signin] { padding: 26px 22px 24px; }
+}
+[estilo-signin-foot] { margin-block-start: var(--rst-sp-6); font-size: var(--rst-fs-xs); color: var(--rst-text-muted); }
+/* The door's links are drawn here, not left to the app: an app that does
+ not link base.css (Calendar, Memoria, Calls, Fichas) showed the browser's
+ blue on the card. As base.css does, a link in the card is the app's
+ colour at the lowest specificity, so a link drawn as a button keeps the
+ button's; the foot's is quiet, like its text. */
+:where([estilo-signin]) a { color: var(--rst-accent); text-underline-offset: 0.15em; }
+[estilo-signin-foot] a { color: inherit; }
+[estilo-signin-foot] a:hover, [estilo-signin-foot] a:focus-visible { color: var(--rst-text); }
+
+/* Oficina connect: copied from id.oficina.works (theme.css, estilo sky.css,
+ brand.css and chrome.css's door rules), plus the few component rules the
+ consent and connections pages need. */
+:root {
+ --rst-fs-xs: 0.71875rem; --rst-fs-sm: 0.78125rem; --rst-fs-base: 0.875rem; --rst-fs-lg: 1.0625rem;
+ --rst-sp-1: 0.25rem; --rst-sp-2: 0.5rem; --rst-sp-3: 0.75rem; --rst-sp-4: 1rem; --rst-sp-5: 1.5rem; --rst-sp-6: 2.5rem;
+}
+* { box-sizing: border-box; }
+html { background: var(--rst-bg); }
+body { margin: 0; font: var(--rst-fs-lg)/1.5 var(--rst-font); color: var(--rst-text); background: var(--rst-bg); }
+main { display: block; }
+[estilo-signin] p { margin: 0 0 var(--rst-sp-4); color: var(--rst-text-muted); }
+[estilo-signin] > [estilo-brand] { color: var(--rst-text); }
+[estilo-signin] ul { margin: 0 0 var(--rst-sp-5); padding-left: 1.25rem; }
+[estilo-signin] li { margin-block: .25rem; }
+[estilo-signin] h1 { margin-bottom: var(--rst-sp-3); }
+[estilo-signin] h2 { margin: 0 0 .5rem; font-size: var(--rst-fs-lg); }
+[estilo-signin] fieldset { margin: 0 0 var(--rst-sp-5); padding: 0; border: 0; min-width: 0; }
+[estilo-signin] legend { padding: 0; margin-bottom: .5rem; font-weight: 600; }
+[estilo-signin] label { display: flex; align-items: center; gap: .75rem; min-height: 2.75rem; padding: .5rem .75rem; margin-bottom: .5rem; border: 1px solid var(--rst-line-strong); border-radius: var(--rst-radius-sm); cursor: pointer; }
+[estilo-signin] label:has(input:checked) { border-color: var(--rst-accent); background: var(--rst-accent-soft); }
+[estilo-signin] input[type=checkbox] { inline-size: 1.25rem; block-size: 1.25rem; margin: 0; accent-color: var(--rst-accent); flex-shrink: 0; }
+[estilo-signin] button { font: inherit; font-size: var(--rst-fs-lg); font-weight: 600; min-height: 2.75rem; padding: .5rem 1rem; border-radius: var(--rst-radius-sm); border: 1px solid var(--rst-line-strong); background: var(--rst-surface); color: var(--rst-text); cursor: pointer; }
+[estilo-signin] button:hover { border-color: var(--rst-accent); color: var(--rst-accent); }
+[estilo-signin] button[value=approve], [estilo-signin] section button { background: var(--rst-accent); border-color: var(--rst-accent); color: var(--rst-on-accent); }
+[estilo-signin] button[value=approve]:hover, [estilo-signin] section button:hover { background: var(--rst-accent-strong); border-color: var(--rst-accent-strong); color: var(--rst-on-accent); }
+[estilo-signin] button:focus-visible, [estilo-signin] input:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: 2px; }
.actions { display: flex; flex-direction: column; gap: .625rem; }
.actions button { width: 100%; }
-section { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
-section form button { width: 100%; }
+[estilo-signin] section { padding-top: var(--rst-sp-4); margin-top: var(--rst-sp-4); border-top: 1px solid var(--rst-line); }
+[estilo-signin] section form button { width: 100%; }
@media (min-width: 30rem) {
- body { align-items: center; }
- main { padding: 2rem; margin-block: 1rem; }
.actions { flex-direction: row-reverse; }
.actions button { width: auto; flex: 1; }
}
diff --git a/grant/static/sky/filaments.svg b/grant/static/sky/filaments.svg
new file mode 100644
index 0000000..271b954
--- /dev/null
+++ b/grant/static/sky/filaments.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 640" width="1600" height="640" preserveAspectRatio="xMidYMid slice"><defs><linearGradient id="f0" gradientUnits="userSpaceOnUse" x1="636" x2="1650" y1="0" y2="0"><stop offset=".05" stop-color="#fff" stop-opacity="0"/><stop offset=".45" stop-color="#fff"/><stop offset=".55" stop-color="#fff"/><stop offset=".95" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient id="f1" gradientUnits="userSpaceOnUse" x1="242" x2="1012" y1="0" y2="0"><stop offset=".05" stop-color="#fff" stop-opacity="0"/><stop offset=".45" stop-color="#fff"/><stop offset=".55" stop-color="#fff"/><stop offset=".95" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient id="f2" gradientUnits="userSpaceOnUse" x1="251" x2="1513" y1="0" y2="0"><stop offset=".05" stop-color="#fff" stop-opacity="0"/><stop offset=".45" stop-color="#fff"/><stop offset=".55" stop-color="#fff"/><stop offset=".95" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient id="f3" gradientUnits="userSpaceOnUse" x1="403" x2="1696" y1="0" y2="0"><stop offset=".05" stop-color="#fff" stop-opacity="0"/><stop offset=".45" stop-color="#fff"/><stop offset=".55" stop-color="#fff"/><stop offset=".95" stop-color="#fff" stop-opacity="0"/></linearGradient><filter id="b" x="-5%" y="-20%" width="110%" height="140%"><feGaussianBlur stdDeviation="2.4"/></filter></defs><g fill="none" filter="url(#b)"><polyline points="636,361.5 656,359.5 676,357.6 696,355.8 716,354.1 736,352.6 756,351.2 776,350.0 796,349.0 816,348.1 836,347.3 856,346.8 876,346.4 896,346.1 916,346.1 936,346.2 956,346.5 976,347.0 996,347.6 1016,348.5 1036,349.4 1056,350.6 1076,351.9 1096,353.3 1116,354.8 1136,356.5 1156,358.4 1176,360.3 1196,362.3 1216,364.4 1236,366.6 1256,368.9 1276,371.3 1296,373.6 1316,376.1 1336,378.5 1356,381.0 1376,383.5 1396,386.0 1416,388.4 1436,390.9 1456,393.3 1476,395.7 1496,398.0 1516,400.2 1536,402.4 1556,404.5 1576,406.6 1596,408.5 1616,410.4 1636,412.1" stroke="url(#f0)" stroke-width="0.8" opacity="0.50"/><polyline points="636,358.5 656,356.8 676,355.1 696,353.6 716,352.2 736,351.0 756,349.9 776,349.0 796,348.1 816,347.5 836,347.0 856,346.6 876,346.5 896,346.4 916,346.5 936,346.8 956,347.2 976,347.7 996,348.4 1016,349.3 1036,350.2 1056,351.3 1076,352.5 1096,353.9 1116,355.3 1136,356.9 1156,358.5 1176,360.2 1196,362.1 1216,364.0 1236,365.9 1256,367.9 1276,370.0 1296,372.1 1316,374.3 1336,376.5 1356,378.7 1376,380.9 1396,383.1 1416,385.3 1436,387.5 1456,389.7 1476,391.9 1496,394.1 1516,396.2 1536,398.2 1556,400.2 1576,402.2 1596,404.1 1616,405.9 1636,407.7" stroke="url(#f0)" stroke-width="1.3" opacity="0.26"/><polyline points="242,300.2 262,300.4 282,300.5 302,300.5 322,300.3 342,300.0 362,299.5 382,298.9 402,298.2 422,297.4 442,296.4 462,295.4 482,294.2 502,292.9 522,291.5 542,289.9 562,288.3 582,286.7 602,284.9 622,283.0 642,281.1 662,279.2 682,277.1 702,275.1 722,273.0 742,270.8 762,268.7 782,266.5 802,264.3 822,262.1 842,259.9 862,257.8 882,255.6 902,253.5 922,251.4 942,249.3 962,247.3 982,245.3 1002,243.3" stroke="url(#f1)" stroke-width="1.7" opacity="0.24"/><polyline points="242,315.5 262,315.0 282,314.3 302,313.5 322,312.4 342,311.2 362,309.9 382,308.4 402,306.9 422,305.2 442,303.4 462,301.5 482,299.6 502,297.6 522,295.6 542,293.6 562,291.5 582,289.4 602,287.4 622,285.3 642,283.3 662,281.3 682,279.3 702,277.4 722,275.6 742,273.7 762,272.0 782,270.3 802,268.7 822,267.2 842,265.7 862,264.3 882,262.9 902,261.6 922,260.4 942,259.2 962,258.0 982,256.9 1002,255.8" stroke="url(#f1)" stroke-width="1.1" opacity="0.25"/><polyline points="251,211.1 271,208.2 291,205.2 311,202.1 331,198.9 351,195.7 371,192.4 391,189.1 411,185.8 431,182.4 451,179.0 471,175.7 491,172.4 511,169.1 531,165.9 551,162.7 571,159.6 591,156.6 611,153.7 631,150.9 651,148.2 671,145.6 691,143.2 711,140.9 731,138.8 751,136.8 771,135.1 791,133.4 811,132.0 831,130.7 851,129.7 871,128.8 891,128.1 911,127.7 931,127.4 951,127.3 971,127.4 991,127.8 1011,128.3 1031,129.1 1051,130.0 1071,131.2 1091,132.5 1111,134.0 1131,135.7 1151,137.6 1171,139.7 1191,141.9 1211,144.3 1231,146.8 1251,149.4 1271,152.2 1291,155.2 1311,158.2 1331,161.3 1351,164.5 1371,167.8 1391,171.1 1411,174.5 1431,178.0 1451,181.4 1471,184.9 1491,188.3 1511,191.7" stroke="url(#f2)" stroke-width="1.2" opacity="0.25"/><polyline points="251,224.6 271,221.4 291,218.1 311,214.7 331,211.2 351,207.5 371,203.8 391,199.9 411,196.1 431,192.2 451,188.3 471,184.4 491,180.5 511,176.7 531,173.0 551,169.3 571,165.7 591,162.2 611,158.9 631,155.7 651,152.7 671,149.8 691,147.2 711,144.7 731,142.5 751,140.4 771,138.6 791,137.0 811,135.7 831,134.6 851,133.7 871,133.1 891,132.7 911,132.6 931,132.7 951,133.1 971,133.7 991,134.5 1011,135.6 1031,136.9 1051,138.4 1071,140.1 1091,141.9 1111,144.0 1131,146.2 1151,148.6 1171,151.2 1191,153.8 1211,156.6 1231,159.5 1251,162.5 1271,165.6 1291,168.7 1311,171.9 1331,175.2 1351,178.5 1371,181.8 1391,185.0 1411,188.3 1431,191.6 1451,194.8 1471,198.0 1491,201.1 1511,204.2" stroke="url(#f2)" stroke-width="1.4" opacity="0.23"/><polyline points="403,283.1 423,283.4 443,283.8 463,284.3 483,284.8 503,285.4 523,286.1 543,286.7 563,287.5 583,288.2 603,289.1 623,289.9 643,290.8 663,291.7 683,292.6 703,293.5 723,294.4 743,295.3 763,296.3 783,297.2 803,298.1 823,299.0 843,299.9 863,300.8 883,301.6 903,302.4 923,303.2 943,304.0 963,304.8 983,305.5 1003,306.2 1023,306.8 1043,307.5 1063,308.1 1083,308.7 1103,309.3 1123,309.9 1143,310.4 1163,311.0 1183,311.5 1203,312.0 1223,312.5 1243,313.0 1263,313.5 1283,314.0 1303,314.5 1323,315.0 1343,315.5 1363,316.1 1383,316.6 1403,317.2 1423,317.7 1443,318.3 1463,318.9 1483,319.5 1503,320.1 1523,320.7 1543,321.4 1563,322.0 1583,322.6 1603,323.3 1623,323.9 1643,324.6 1663,325.2 1683,325.8" stroke="url(#f3)" stroke-width="1.5" opacity="0.42"/><polyline points="403,292.4 423,292.5 443,292.5 463,292.7 483,292.8 503,293.0 523,293.3 543,293.6 563,293.9 583,294.3 603,294.7 623,295.1 643,295.6 663,296.1 683,296.6 703,297.2 723,297.9 743,298.5 763,299.2 783,299.9 803,300.7 823,301.5 843,302.3 863,303.1 883,304.0 903,304.8 923,305.7 943,306.6 963,307.6 983,308.5 1003,309.5 1023,310.4 1043,311.4 1063,312.3 1083,313.3 1103,314.3 1123,315.2 1143,316.2 1163,317.1 1183,318.1 1203,319.0 1223,319.9 1243,320.8 1263,321.6 1283,322.5 1303,323.3 1323,324.1 1343,324.9 1363,325.7 1383,326.4 1403,327.1 1423,327.8 1443,328.5 1463,329.1 1483,329.7 1503,330.2 1523,330.7 1543,331.2 1563,331.7 1583,332.1 1603,332.5 1623,332.9 1643,333.2 1663,333.5 1683,333.7" stroke="url(#f3)" stroke-width="1.6" opacity="0.21"/></g></svg>
\ No newline at end of file
diff --git a/grant/static/sky/grain.svg b/grant/static/sky/grain.svg
new file mode 100644
index 0000000..13b0d83
--- /dev/null
+++ b/grant/static/sky/grain.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 640" width="1600" height="640" preserveAspectRatio="xMidYMid slice"><defs><filter id="b" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="70"/></filter><filter id="n" filterUnits="userSpaceOnUse" x="0" y="0" width="1600" height="640"><feTurbulence type="fractalNoise" baseFrequency=".85" numOctaves="2" seed="7" stitchTiles="stitch" result="n"/><feColorMatrix in="n" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .33 .33 .33 0 0" result="w"/><feComponentTransfer in="w" result="lit"><feFuncA type="linear" slope="0.68" intercept="-0.34"/></feComponentTransfer><feColorMatrix in="n" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .33 .33 .33 0 0" result="k"/><feComponentTransfer in="k" result="shade"><feFuncA type="linear" slope="-0.68" intercept="0.34"/></feComponentTransfer><feMerge result="specks"><feMergeNode in="lit"/><feMergeNode in="shade"/></feMerge><feComposite in="specks" in2="SourceGraphic" operator="in"/></filter></defs><g filter="url(#n)"><g filter="url(#b)"><ellipse cx="196" cy="73" rx="161" ry="118" fill="#000" opacity="0.27" transform="rotate(6.3 196 73)"/><ellipse cx="365" cy="269" rx="91" ry="80" fill="#000" opacity="0.40" transform="rotate(25.5 365 269)"/><ellipse cx="348" cy="286" rx="177" ry="51" fill="#000" opacity="0.36" transform="rotate(15.8 348 286)"/><ellipse cx="429" cy="79" rx="176" ry="95" fill="#000" opacity="0.51" transform="rotate(-3.9 429 79)"/><ellipse cx="487" cy="49" rx="171" ry="78" fill="#000" opacity="0.51" transform="rotate(-2.8 487 49)"/><ellipse cx="581" cy="221" rx="112" ry="70" fill="#000" opacity="0.45" transform="rotate(-16.0 581 221)"/><ellipse cx="581" cy="288" rx="156" ry="103" fill="#000" opacity="0.74" transform="rotate(21.9 581 288)"/><ellipse cx="847" cy="20" rx="112" ry="102" fill="#000" opacity="0.59" transform="rotate(-17.5 847 20)"/><ellipse cx="905" cy="74" rx="116" ry="86" fill="#000" opacity="0.56" transform="rotate(21.7 905 74)"/><ellipse cx="927" cy="155" rx="156" ry="65" fill="#000" opacity="0.37" transform="rotate(10.3 927 155)"/><ellipse cx="1061" cy="205" rx="258" ry="132" fill="#000" opacity="0.57" transform="rotate(23.5 1061 205)"/><ellipse cx="885" cy="175" rx="214" ry="76" fill="#000" opacity="0.65" transform="rotate(-14.6 885 175)"/><ellipse cx="1026" cy="2" rx="157" ry="78" fill="#000" opacity="0.30" transform="rotate(11.7 1026 2)"/><ellipse cx="1294" cy="82" rx="127" ry="64" fill="#000" opacity="0.61" transform="rotate(0.1 1294 82)"/><ellipse cx="1630" cy="72" rx="158" ry="109" fill="#000" opacity="0.56" transform="rotate(10.0 1630 72)"/><ellipse cx="1531" cy="97" rx="144" ry="118" fill="#000" opacity="0.52" transform="rotate(7.9 1531 97)"/></g></g></svg>
\ No newline at end of file
diff --git a/grant/static/sky/placeholder-dark.png b/grant/static/sky/placeholder-dark.png
new file mode 100644
index 0000000..1ed4d83
Binary files /dev/null and b/grant/static/sky/placeholder-dark.png differ
diff --git a/grant/static/sky/placeholder-light.png b/grant/static/sky/placeholder-light.png
new file mode 100644
index 0000000..9cbac7d
Binary files /dev/null and b/grant/static/sky/placeholder-light.png differ