Sunlight passes through stacked glass panes, the ground's infrared is caught and sent back: change the number and opacity of the layers and watch the surface warm to a steady state.
-temperature with no layers (T_e)
-surface temperature with the layers
-greenhouse warming
-sunlight absorbed (average)
-infrared leaving the top
-back radiation onto the ground
-infrared emitted by the ground
-surface temperature right now (time-lapse)
The science
Energy in. A planet with albedo alpha and sunlight S0 (W/m2 at the planet) absorbs on average S = (1 - alpha) S0 / 4 per square metre: the factor 4 is the ratio of the sphere's surface to the disc that catches the light. With no atmosphere the surface must radiate this back, and the Stefan-Boltzmann law sigma T^4 (sigma = 5.67e-8 W/m2/K4) gives the "no-atmosphere" temperature T_e = [S / sigma]^(1/4): 255 K for Earth's 1361 W/m2 and alpha = 0.30.
Layers. Here the atmosphere is N thin layers (shown as glass panes) that are transparent to sunlight but each absorb a fraction eps of the infrared that reaches it from either side (the rest passes through) and emit eps sigma T^4 both up and down. Steady state means every layer absorbs as much as it emits: eps (u_(i-1) + d_i) = 2 eps sigma T_i^4, where u and d are the upward and downward infrared flows between levels, linked by u_i = (1 - eps) u_(i-1) + eps sigma T_i^4 and d_(i-1) = (1 - eps) d_i + eps sigma T_i^4. The ground gets sunlight plus the back radiation d_0: sigma T_s^4 = S + d_0. These 3N + 1 linear equations for the emitted fluxes are solved by Gaussian elimination.
Closed forms. For black layers (eps = 1) the net upward flux between all levels equals S and the surface satisfies sigma T_s^4 = (N + 1) S, so T_s = T_e (N + 1)^(1/4): the first layer helps most, each further one less. For one layer with absorptivity eps, T_s = [S / (sigma (1 - eps/2))]^(1/4). With eps = 0.78 and Earth's numbers this gives about 288 K, the observed global mean, but only because eps was chosen to make it so: it is an effective value, not a measured one.
Time-lapse. The page also integrates the heat balance in time (RK4): the surface has a heat store C_s = rho c h of a mixed layer of water of depth h, each layer holds 1e7 J/m2/K. When you change a slider the temperatures relax to the new steady state over years to decades, as the real climate does with a lag. The independent check integrates the same equations from a cold start and compares the endpoint with the linear solve.
What it leaves out. This is a grey, one-dimensional radiative model. It has no convection (real air near the ground is stirred, so the real lapse rate caps the temperature drop with height), no clouds, no water-vapour or ice-albedo feedbacks, no wavelength dependence (real gases absorb in bands and saturate), no day-night or latitude structure, and no change of albedo with temperature. The preset "More greenhouse gas" simply raises eps and is not a carbon-dioxide calculation; the commonly quoted logarithmic forcing of about 5.35 ln(C/C0) W/m2 is a typical literature value that this model does not use. The "thick toy atmosphere" shows the direction of Venus-like warming but is far below the real 737 K, because the real atmosphere is optically much thicker than eight layers.
Reading the picture. Yellow cones are sunlight (white ones are the reflected share, alpha); red cones are infrared going up and pink ones infrared going down between the levels, in numbers proportional to the flux. Their count is a visual scaling, the temperatures and fluxes in the panel are exact. Panes and ground are coloured by their temperature in "thermal colours" mode.