Colour Palette

Backgrounds

BG Primary
BG Secondary
BG Deep

Page Background Gradient

The fixed page background: Coral Sunrise in light theme, Dusk in dark. A dedicated position: fixed layer, not a scroll-mapped background, so this same range is always what's behind the top and bottom of the viewport regardless of scroll position.

Top of gradient. --text-muted holds 4.5:1 here (roughly the top 10% in light theme; the whole range in dark theme).
Bottom of gradient. Use --text-muted-on-gradient here instead, for muted text sitting directly on the raw background rather than an opaque card.

--bg-primary stays defined and unchanged as the flat fallback (print, and anywhere the gradient must never appear).

Semantic

Night
Twilight
Sun

Text

Text Primary
Text Secondary
Text Muted

Accent & Status

Accent
Accent Fill
Positive
Negative
Info
Danger
Neutral

Surface & Border

Card BG
Card Border
Divider

Typography

All text uses Inter. Code uses JetBrains Mono.

Display
48 / Light / 1.1
The golden hour
H1
36 / Semibold / 1.2
Page Title
H2
30 / Semibold / 1.25
Section Heading
H3
24 / Semibold / 1.3
Subsection Heading
H4
20 / Semibold / 1.35
Card Title
H5
18 / Semibold / 1.4
Minor Heading
H6
16 / Bold / 1.4
Inline Heading
Body
16 / Regular / 1.6
The sun rises over the eastern horizon, casting long shadows across the landscape. Each day brings a few more minutes of light as we move through the seasons.
Body Small
14 / Regular / 1.5
Secondary content, table cells, and supporting information. Used where space is tight or for less prominent text.
Caption
12 / Regular / 1.4
Metadata, timestamps, and fine print
Label
11 / Semibold / 1.25
Sunrise · Sunset · Solar Noon
Code
14 / Regular / 1.5
const sunrise = calculateSunrise(lat, lng);

Spacing

Base unit is 4px. All spacing values are multiples of 4.

xs
4px
sm
8px
md
12px
base
16px
lg
20px
xl
24px
2xl
32px
3xl
48px
4xl
64px

Border Radius

none (0)
sm (4px)
md (8px)
lg (12px)
xl (16px)
2xl (24px)
full

Buttons

Variants

Sizes

Cards

Standard Card

16px radius, standard padding. Used for most content containers.

Daylight Summary

14h 32m of daylight today. That's 2m 14s more than yesterday.

Feature Card

24px radius for prominent, hero-level content blocks.

Featured / Callout Card

Highlight boxes and testimonials use a bolder uniform border, not a coloured leading edge. A coloured border-left (or border-top) against an otherwise uniform border-radius clips into a rounded pill at the corners, the same admonition-block look most AI-generated interfaces default to. Every corner of the border stays the same weight here instead.

You're looking at one

This card is distinguished from the ones above only by its border colour and weight, not by a filled background tint or an asymmetric radius.

Table

Date Sunrise Sunset Day Length Delta
12 Feb 07:32 17:14 9h 42m +2m 31s
13 Feb 07:30 17:16 9h 46m +2m 33s
14 Feb 07:28 17:18 9h 50m +2m 35s
15 Feb 07:26 17:20 9h 54m +2m 37s
16 Feb 07:24 17:22 9h 58m +2m 39s

Form Inputs

Please enter a valid coordinate

Code

Inline

Use the calculateSunrise() function with a LatLng parameter to get the sunrise time for any location.

Block

// Calculate solar position for a given time and location
function getSolarPosition(date, latitude, longitude) {
  const dayOfYear = getDayOfYear(date);
  const declination = 23.45 * Math.sin((360/365) * (dayOfYear - 81));
  const hourAngle = getHourAngle(date, longitude);

  return {
    elevation: calculateElevation(latitude, declination, hourAngle),
    azimuth: calculateAzimuth(latitude, declination, hourAngle)
  };
}

Links

Here is an example link within body text. Links use the accent colour and gain an underline on hover. They should be the only non-primary colour in body text.

Alerts

Information
Solar noon occurs at 12:23 today, when the sun reaches its peak elevation of 24.3°.
Success
Location updated successfully. Sunrise and sunset times have been recalculated.
Warning
Location permissions are disabled. Using last known position for calculations.
Error
Unable to calculate solar times. The provided coordinates are outside valid range.

Badges

Info Published Pending Failed Draft

Numbered Steps

A bordered square with the number in the code font, not a filled circle. The same reasoning as the callout card above: a solid-fill shape reads as a generic AI-generated step indicator.

  1. Set a location. Enter coordinates or use the browser's geolocation.

  2. Calculate solar times. Sunrise, sunset, dawn, and dusk for the selected date.

  3. Track the change. See how day length shifts day over day through the year.

Dividers

Content above the divider.


Content below the divider.