BreakGlass

Style Guide

Every color, shape, word, and movement allowed in BreakGlass lives on this page. Copy patterns from here; do not invent new ones.

Color tokens

--bg
--surface
--surface-2
--text
--text-muted
--border
--accent
--accent-hover
--accent-soft
--ok
--warn
--danger
--info

Swatches respond to the theme toggle — flip the half-circle button in the header to compare light and dark. Printing swaps in an ink-safe palette automatically.

Typography

Heading 1 · --fs-3xl

Boil water before you drink it

Heading 2 · --fs-2xl

Finding water in the field

Heading 3 · --fs-lg

Reading a compass at dusk

Body · --fs-md

Clear water can still carry sickness. Boil every drop until you know better.

Small muted · --fs-sm + --text-muted

Last checked before winter. Verify doses against the medical pages.

Buttons

Default .btn

Primary · .btn.btn-primary

Ghost · .btn.btn-ghost

Disabled

Badges

Default .badge

Needs network mode

Warning · .badge.badge-warn

Requires server

Callouts

Danger

Blood that soaks through the cloth means pressure now. Press hard, stack fresh cloth on top, and do not lift to peek.

Warning

Generators, camp stoves, and charcoal make carbon monoxide. Run them outside, away from windows and doors.

Caution

Treat any well, cistern, or tap that flooded as dirty until it is disinfected and tested.

Info

This kit grows in passes. Draft pages cover the safety basics first; polish arrives later.

Cards & tiles

Plain card

A card groups related content without asking for action. Tiles invite clicks; cards hold still. Reach for a card when the reader only needs to read.

Forms

Search pair · .searchbar

Checkboxes
Radios

Checklists

.checklist — printable tick-boxes

Boxes print as empty squares so a printed page works as a pen-and-paper checklist. Use for anything a reader ticks off under stress.

Article prose

Wrap long-form page content in .article — it restores vertical rhythm (the site reset zeroes all margins) using only spacing tokens. Headings, lists, tables, and paragraphs space themselves; no inline margins.

Long articles pair .article with four scanning aids, demonstrated below: .toc-chips (section jump-links), .keyfacts (at-a-glance essentials), .steps (numbered procedures), and <details class="fold"> (optional depth that stays printable).

.toc-chips — section jump links under the h1

.keyfacts — the numbers and rules a reader needs first

At a glance

  • 1 gallon per person per day — half drinking, half hygiene
  • Boil 1 minute below 6,500 ft; 3 minutes above
  • Unopened fridge keeps food safe 4 hours

ol.steps — procedures get accent-numbered circles

  1. Press hard on the wound with clean cloth.
  2. Add layers — never remove soaked ones.
  3. Keep pressure for ten full minutes.

details.fold — optional depth, closed by default, prints open

Why this works (background)

Deeper explanation lives here, off the main scanning path but present for readers who want it — and it still appears when the page is printed.

Cool the burn first

Hold the burned skin under cool running water for ten to twenty minutes. This does more good than any cream.

  1. Remove jewelry near the burn now, before swelling starts.
  2. Cover loosely with clean, non-stick cloth.
Specimen table inside .article
DegreeSkin looks like
FirstRed, dry, painful
SecondBlisters, wet-looking

Tables

Sample data — not medical advice

Children's fever medicine, layout specimen only. Real dosing lives in medical/ and must be verified before use.
Weight of personLiquid (100 mg / 5 mL)Tablets (200 mg)
24–35 lb5 mL—
36–47 lb7.5 mL—
48–59 lb10 mL—
60–71 lb12.5 mLhalf tablet
72–95 lb15 mLone tablet
96 lb and up20 mLone tablet

Phase banners

Survive — secure water, first aid, shelter.

The live banner recolors from body[data-phase] (Everyday · Survive · Stabilize · Rebuild · Thrive). Switch phases in the header to watch this one change; the copy shown here pins the Survive wording.

Icon reference

magnifying-glass
house
truck-medical
user-doctor
hammer
droplet
paw
tower-broadcast
globe
book
bible
graduation-cap
robot
leaf
city
map-location-dot
table-list
toolbox
calculator
screwdriver-wrench
gamepad
circle-half-stroke
moon
sun

Emergency components

Patterns for the Emergency Hub: tone-tinted glance-cards, form fields for the printable document vault, and the drill timer.

.glance-card + .tone-* — one action set per emergency

Severe bleeding

  • Press hard with clean cloth
  • Add layers, never remove
  • Ten full minutes, no peeking

Gas smell

  • Don't flip switches
  • Leave immediately
  • Call from outside

.form-label + .form-input (+ .form-row spacing)

.timer-display — drill clock (tabular numerals)

04:37

School components

Reward and identity pieces for the Schoolhouse: tone-tinted avatars, pop-in reveals, earned-star rows, and a confetti burst for celebrations (all freeze under prefers-reduced-motion).

A B C D E
Lesson complete! Cards can pop in on success.
★★★☆

Hard rules

  1. Tokens only. Every color, space, radius, shadow, duration, easing, and type size comes from a theme.css custom property.
  2. Functional without JS. Reading, navigation, search fallback, and print all work with scripts off.
  3. Styleguide-first components. New UI pieces land on this page before any page uses them.
  4. No external requests, ever. Fonts, icons, code, and data ride inside the kit folder.
  5. Print styles required. Survival pages get printed and taped to walls; assume paper.
  6. Plain voice. Calm authority, short sentences, zero hype.

Motion

Hover me — the lift runs on --dur-base + --ease-out with --shadow-2.

The whole motion budget is three durations (--dur-fast, --dur-base, --dur-slow) and two easings (--ease-out, --ease-spring). Nothing else moves. Under prefers-reduced-motion every animation freezes site-wide while the kit stays fully usable.

Reader shell & embedded theming

Full-viewport reading surfaces (the ZIM wiki reader at wiki/read.html) use an app-shell layout: standard topbar on top, a slim toolbar row, then a content stage that flexes to fill all remaining height. Status badges live in the footer line, never in the toolbar.

Article title — centered, ellipsized Search this archive…
content stage — flex:1, fills remaining viewport height
How to use this siteServer modearchive.zimBreakGlass © 2026

Sandboxed third-party articles (Wikipedia ZIMs) are themed by bridging tokens: assets/wiki-theme.js reads computed token values from this document, writes them as --bgw-* variables onto the iframe root, and applies a scoped override sheet (.bg-wiki). Theme toggles re-paint live via a data-theme observer. Web-capture archives get color-scheme basics only (.bg-wiki-zimit). List rows for pickable packs use .kit-entry; a requested pack highlights with .kit-requested.