NGU-Web/src/index.css
Zaldimmar 502a294940 Reading mode spacing, phone map width, no fixed back links
- Reading mode: parts the page draws on their own lines get a space
  between them, so words no longer run together; the column is 60rem
  (was 42rem) and headings are bold in the display face.
- Local groups map scales to its column on a phone instead of holding
  34rem and scrolling sideways.
- Group, region, partner and team pages drop their fixed back link
  (records are reached from many pages); orgListHref is gone.
  Not-found pages keep theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 16:46:41 -05:00

638 lines
20 KiB
CSS

@import '@fontsource/montserrat/400.css';
@import '@fontsource/montserrat/600.css';
@import '@fontsource/montserrat/700.css';
@import '@fontsource/poppins/400.css';
@import '@fontsource/poppins/600.css';
@import '@fontsource/poppins/700.css';
@import '@fontsource/poppins/800.css'; /* the front page's stat numbers only */
@import '@fontsource/opendyslexic/400.css'; /* the accessibility panel's font, */
@import '@fontsource/opendyslexic/700.css'; /* only downloaded when chosen */
@import 'tailwindcss';
@theme {
--font-display: 'Poppins', sans-serif;
--font-body: 'Montserrat', sans-serif;
/* ── Color tokens ─────────────────────────────────────────────
Named for what they do, not what they look like, because dark
mode (below) swaps the values. Use them as utilities
(text-muted, bg-surface, border-brand/20) or, in a style prop,
as var(--color-muted). Every text color passes WCAG AA (4.5:1)
on surface, tint and tint-soft in both modes.
A color that must stay the same in both modes (white text on
a dark band, a platform's own color) stays a literal. Colors
that arrive as data (page accents, event and region colors) go
through withAlpha() and accentText() in src/lib/color.ts. */
--color-ink: #001011; /* headings */
--color-body: #003a45; /* body text */
--color-muted: #3b5456; /* secondary text, quiet borders */
--color-link: #00748a; /* links and teal text */
--color-brand: #00748a; /* decoration: borders, rings, rules */
--color-action: #00748a; /* button fills, under white text */
--color-action-hover: #003a45;
--color-surface: #f5f9f8; /* page and cards */
--color-tint: #d6f5fa; /* tinted sections and panels */
--color-tint-soft: #e8f5f6; /* hover rows, faint panels */
--color-danger: #b3261e;
--color-danger-tint: #fdf3f2;
/* Cards: a step off the page so they read as sitting on it (white
here; a touch of tint in dark mode, below). Derived rather than
an admin token, so it follows the palette. With a shadow. */
--color-raised: #ffffff;
/* Tailwind's shadows, tinted with the site's deep ink instead of
black, so a card's shadow belongs to the page. */
--shadow-2xs: 0 1px rgb(0 16 17 / 0.05);
--shadow-xs: 0 1px 2px 0 rgb(0 16 17 / 0.05);
--shadow-sm: 0 1px 3px 0 rgb(0 16 17 / 0.1), 0 1px 2px -1px rgb(0 16 17 / 0.1);
--shadow-md: 0 4px 6px -1px rgb(0 16 17 / 0.1), 0 2px 4px -2px rgb(0 16 17 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 16 17 / 0.12), 0 4px 6px -4px rgb(0 16 17 / 0.1);
--shadow-xl: 0 20px 25px -5px rgb(0 16 17 / 0.12), 0 8px 10px -6px rgb(0 16 17 / 0.1);
--shadow-2xl: 0 25px 50px -12px rgb(0 16 17 / 0.3);
}
/* How much of an accent color its text keeps (src/lib/color.ts,
accentText): all of it on light, half (the rest white) on dark. */
:root {
--accent-text-mix: 100%;
/* The side nav's lit label sits on its circle, the section's darkest
shade in dark mode, so it goes further toward white there (6.8:1
or better for every accent; 50% left the deep teal at 4.2:1). */
--nav-text-mix: 100%;
}
/* Dark mode: the visitor's system setting, unless the header toggle
chose (data-theme on <html>, set before first paint in index.html
and by ThemeToggle). */
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
@layer base {
:root[data-theme="dark"] {
--color-ink: #f5f9f8;
--color-body: #d6f5fa;
--color-muted: #a3b8b9;
--color-link: #5cd3e6;
--color-brand: #00748a;
--color-action: #00748a;
--color-action-hover: #003a45;
--color-surface: #001011;
--color-tint: #003a45;
--color-tint-soft: #00222a;
--color-danger: #ff8a80;
--color-danger-tint: #3b1714;
--color-raised: color-mix(in srgb, var(--color-tint) 35%, var(--color-surface));
--accent-text-mix: 50%;
--nav-text-mix: 30%;
color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--color-ink: #f5f9f8;
--color-body: #d6f5fa;
--color-muted: #a3b8b9;
--color-link: #5cd3e6;
--color-brand: #00748a;
--color-action: #00748a;
--color-action-hover: #003a45;
--color-surface: #001011;
--color-tint: #003a45;
--color-tint-soft: #00222a;
--color-danger: #ff8a80;
--color-danger-tint: #3b1714;
--color-raised: color-mix(in srgb, var(--color-tint) 35%, var(--color-surface));
--accent-text-mix: 50%;
--nav-text-mix: 30%;
color-scheme: dark;
}
}
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
/* Clear of the fixed header (Layout.tsx measures it): anything
scrolled to, by an anchor or by keyboard focus, lands below it. */
scroll-padding-top: calc(var(--header-h, 0px) + 1rem);
}
/* An email address is one long word: let it break anywhere rather
than push a button or card past a phone's edge. */
a[href^="mailto:"] {
overflow-wrap: anywhere;
max-width: 100%;
}
/* One visible focus ring for keyboard users, wherever a component
doesn't draw its own. */
:focus-visible {
outline: 2px solid var(--color-link);
outline-offset: 2px;
}
/* Not on things focused only to move the reader there (the page's
content on a new page, a section jumped to; motion.ts, jumpTo):
they aren't controls, and a ring round a whole section is noise. */
[tabindex="-1"]:focus {
outline: none;
}
/* Visitors who ask for less motion get no smooth scrolling, slides
or hover zooms. */
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
body {
font-family: 'Montserrat', sans-serif;
background-color: var(--color-surface);
color: var(--color-ink);
-webkit-font-smoothing: antialiased;
}
/* Type: Poppins Bold for titles, headings and buttons (the btn
utility), Poppins at regular weight for subheadings, Montserrat
for everything else. */
h1, h2, h3, h4, h5, h6 {
font-family: 'Poppins', sans-serif;
font-weight: bold;
}
/* A logo on a dark page: many are drawn for white paper (dark marks,
transparent background) and would vanish. .logo-plate gives them
a small light backing in dark mode only. */
:root[data-theme="dark"] .logo-plate {
background: #f5f9f8;
padding: 0.25rem;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .logo-plate {
background: #f5f9f8;
padding: 0.25rem;
}
}
/* Printing (a blog post's Download PDF, or any page): the light
palette whatever the screen shows, since paper is white and dark
mode's pale text would barely print; and backgrounds kept, so the
tinted panels and table rows come out as on screen. */
@media print {
:root,
:root[data-theme="dark"] {
--color-ink: #001011;
--color-body: #003a45;
--color-muted: #3b5456;
--color-link: #00748a;
--color-brand: #00748a;
--color-surface: #f5f9f8;
--color-tint: #d6f5fa;
--color-tint-soft: #e8f5f6;
--color-danger: #b3261e;
--color-danger-tint: #fdf3f2;
--accent-text-mix: 100%;
color-scheme: light;
print-color-adjust: exact;
}
.logo-plate {
background: none !important;
padding: 0 !important;
}
}
@page {
margin: 1.5cm;
}
/* Church Center's giving modal (Giving.tsx) is a transparent iframe
over the whole page, drawn for light pages. On a dark page the
browser sees the iframe's scheme differ from ours and paints its
background opaque, so the page behind goes solid white. Telling it
the iframe is light keeps the backdrop see-through. */
iframe[src*="churchcenter"] {
color-scheme: light;
}
/* Corners, one rule for the site: none. Everything is square except
buttons (the btn utility below, or var(--btn-radius) in plain CSS)
and video players, which get a small radius, and things that are
round by nature: dots, radio marks, the play button. */
:root {
--btn-radius: 0.5rem;
}
/* ── Accessibility choices (AccessibilityPanel.tsx) ──────────────
Set on <html> before the first paint (index.html) and by the
panel. */
/* Dyslexia-friendly font: every typeface, headings and buttons too. */
:root[data-font="dyslexic"] {
--font-display: 'OpenDyslexic', sans-serif;
--font-body: 'OpenDyslexic', sans-serif;
}
:root[data-font="dyslexic"] body,
:root[data-font="dyslexic"] h1,
:root[data-font="dyslexic"] h2,
:root[data-font="dyslexic"] h3,
:root[data-font="dyslexic"] h4,
:root[data-font="dyslexic"] h5,
:root[data-font="dyslexic"] h6,
:root[data-font="dyslexic"] button,
:root[data-font="dyslexic"] input,
:root[data-font="dyslexic"] textarea,
:root[data-font="dyslexic"] select {
font-family: 'OpenDyslexic', sans-serif;
}
/* Reading mode: the page as text (ReaderView.tsx, which Layout.tsx
draws in place of the page). Two colors, ink on white or the
reverse in dark mode, unlayered so they win over the admin's
colors (theme.js, in layers); larger type in one column. */
:root[data-reading="on"] {
--color-ink: #111111;
--color-body: #111111;
--color-muted: #444444;
--color-link: #111111;
--color-brand: #111111;
--color-action: #111111;
--color-action-hover: #444444;
--color-surface: #ffffff;
--color-tint: #ffffff;
--color-tint-soft: #ffffff;
--color-raised: #ffffff;
--accent-text-mix: 100%;
font-size: 112.5%;
scroll-behavior: auto;
}
:root[data-reading="on"][data-theme="dark"] {
--color-ink: #eeeeee;
--color-body: #eeeeee;
--color-muted: #bbbbbb;
--color-link: #eeeeee;
--color-brand: #eeeeee;
--color-action: #eeeeee;
--color-action-hover: #bbbbbb;
--color-surface: #111111;
--color-tint: #111111;
--color-tint-soft: #111111;
--color-raised: #111111;
}
@media (prefers-color-scheme: dark) {
:root[data-reading="on"]:not([data-theme="light"]) {
--color-ink: #eeeeee;
--color-body: #eeeeee;
--color-muted: #bbbbbb;
--color-link: #eeeeee;
--color-brand: #eeeeee;
--color-action: #eeeeee;
--color-action-hover: #bbbbbb;
--color-surface: #111111;
--color-tint: #111111;
--color-tint-soft: #111111;
--color-raised: #111111;
}
}
.reader {
max-width: 60rem;
margin-inline: auto;
padding: 2.5rem 1rem 6rem;
line-height: 1.75;
}
.reader > * + * {
margin-top: 1rem;
}
.reader :is(h1, h2, h3, h4, h5, h6) {
margin-top: 2rem;
font-family: var(--font-display);
font-weight: 700;
line-height: 1.3;
}
.reader h1 { font-size: 2rem; }
.reader h2 { font-size: 1.5rem; }
.reader h3 { font-size: 1.25rem; }
.reader :is(h4, h5, h6) { font-size: 1.1rem; }
.reader a {
text-decoration: underline;
text-underline-offset: 0.2em;
}
.reader img {
display: block;
max-width: 100%;
height: auto;
}
/* The palette's three color families as variables, [main, darkest,
light, lightest] as in color.ts, so CSS that draws in them follows
a color blind mode. Ink stays gray in every mode. */
:root {
--pal-teal-0: #00748a;
--pal-teal-1: #003a45;
--pal-teal-2: #5cd3e6;
--pal-teal-3: #d6f5fa;
--pal-green-0: #4a7431;
--pal-green-1: #23361a;
--pal-green-2: #9cc47c;
--pal-green-3: #e6f0dd;
--pal-amber-0: #8f5b00;
--pal-amber-1: #4a2e00;
--pal-amber-2: #f0bd4f;
--pal-amber-3: #fdf1d6;
}
/* Color blind modes (data-vision; color.ts has the reasoning and the
same values for colors set from code and data). Each mode replaces
all three families with ones that stay apart for that type, at the
same contrasts (main shades 5.3:1 or more on white, light ones 9:1
or more under ink), and the theme tokens below follow them. */
:root[data-vision="protanopia"] {
--pal-teal-0: #167c16;
--pal-teal-1: #0b3c0b;
--pal-teal-2: #55ca55;
--pal-teal-3: #e3f5e3;
--pal-green-0: #921a92;
--pal-green-1: #5b105b;
--pal-green-2: #e09ce0;
--pal-green-3: #f9edf9;
--pal-amber-0: #603911;
--pal-amber-1: #482a0d;
--pal-amber-2: #d7ab7f;
--pal-amber-3: #f7efe7;
}
:root[data-vision="deuteranopia"] {
--pal-teal-0: #3939dc;
--pal-teal-1: #1b1b9b;
--pal-teal-2: #aeaee6;
--pal-teal-3: #f0f0fa;
--pal-green-0: #11602b;
--pal-green-1: #0b3c1b;
--pal-green-2: #51c979;
--pal-green-3: #e1f5e7;
--pal-amber-0: #627214;
--pal-amber-1: #30370a;
--pal-amber-2: #a7bd3b;
--pal-amber-3: #eff3db;
}
:root[data-vision="tritanopia"] {
--pal-teal-0: #167a59;
--pal-teal-1: #0a3b2a;
--pal-teal-2: #4bc79e;
--pal-teal-3: #e1f5ee;
--pal-green-0: #a31d33;
--pal-green-1: #661220;
--pal-green-2: #e2a2ac;
--pal-green-3: #f9eef0;
--pal-amber-0: #6f6f14;
--pal-amber-1: #353509;
--pal-amber-2: #b9b93a;
--pal-amber-3: #f2f2d8;
}
/* The theme tokens drawn from the families, light and dark, as in
index.css's defaults. Not in reading mode, which has its own two
colors. Unlayered, so they win over the admin's colors. */
:root:is([data-vision="protanopia"], [data-vision="deuteranopia"], [data-vision="tritanopia"]):not([data-reading="on"]) {
--color-body: var(--pal-teal-1);
--color-link: var(--pal-teal-0);
--color-brand: var(--pal-teal-0);
--color-action: var(--pal-teal-0);
--color-action-hover: var(--pal-teal-1);
--color-tint: var(--pal-teal-3);
--color-tint-soft: color-mix(in srgb, var(--pal-teal-3) 50%, #f5f9f8);
}
:root:is([data-vision="protanopia"], [data-vision="deuteranopia"], [data-vision="tritanopia"]):not([data-reading="on"])[data-theme="dark"] {
--color-body: var(--pal-teal-3);
--color-link: var(--pal-teal-2);
--color-tint: var(--pal-teal-1);
--color-tint-soft: color-mix(in srgb, var(--pal-teal-1) 50%, #001011);
}
@media (prefers-color-scheme: dark) {
:root:is([data-vision="protanopia"], [data-vision="deuteranopia"], [data-vision="tritanopia"]):not([data-reading="on"]):not([data-theme="light"]) {
--color-body: var(--pal-teal-3);
--color-link: var(--pal-teal-2);
--color-tint: var(--pal-teal-1);
--color-tint-soft: color-mix(in srgb, var(--pal-teal-1) 50%, #001011);
}
}
/* Monochrome: the whole page in grays. On the root element a filter
leaves fixed elements (the header, the panel) where they were. */
:root[data-vision="monochrome"] {
filter: grayscale(1);
}
/* A notice where content would be (an empty section, a form's
note, "coming soon"): no box and no fill, just two thick brackets
at opposite corners, top left and bottom right, like a
viewfinder. Padding stays with each use; the brackets sit in its
corners, so give it some. */
@utility notice {
position: relative;
&::before,
&::after {
content: '';
position: absolute;
width: 1.75rem;
height: 1.75rem;
border: 0 solid var(--color-brand);
pointer-events: none;
}
&::before {
top: 0;
left: 0;
border-top-width: 4px;
border-left-width: 4px;
}
&::after {
right: 0;
bottom: 0;
border-right-width: 4px;
border-bottom-width: 4px;
}
}
/* A video's play button (VideoPlayer.tsx) waits for a hover or
keyboard focus where the device can hover; on a touch screen it
always shows, since there is nothing to hover with. */
@media (hover: hover) {
.video-play:not(.video-play--always) > span {
opacity: 0;
transition: opacity 160ms ease, transform 160ms ease;
}
.group:hover .video-play > span,
.group:focus-visible .video-play > span {
opacity: 1;
}
}
/* Buttons, and links drawn as buttons: Poppins Bold, small rounded
corners. Color, size and border stay with each button. */
@utility btn {
font-family: var(--font-display);
font-weight: 700;
border-radius: var(--btn-radius);
}
/* Scrollbar hide */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--color-brand) 40%, transparent); }
.ig-icon { fill: currentColor; transition: fill 200ms ease; }
.ig-link:hover .ig-icon { fill: var(--ig-fill); }
.footer-icons:hover .ig-icon { fill: var(--ig-fill); }
.fb-icon:hover { fill: #0862f7; }
.ds-icon:hover { fill: #5865f1; }
/* Event Card Section */
.ev-card {
container-type: inline-size;
}
.ev-grid {
display: grid;
gap: 0.25rem 1.5rem;
grid-template-columns: 2fr 1fr;
grid-template-areas:
"org image"
"info image"
"desc desc";
}
.ev-org {
grid-area: org;
}
.ev-info {
grid-area: info;
}
.ev-image {
grid-area: image;
justify-self: stretch;
align-self: center;
max-height: 11rem;
}
.ev-desc {
grid-area: desc;
margin-top: 1rem;
}
@container (max-width: 30rem) {
.ev-grid {
grid-template-columns: 1fr;
/* The logo gets its own row: without one, grid-area: image made
an extra column beside the text. */
grid-template-areas:
"image"
"org"
"info"
"desc";
}
.ev-grid .ev-image {
justify-self: start;
width: auto;
max-height: 7rem;
margin-bottom: 0.5rem;
}
}
/* ═══════════════════════════════════════════════════════════════
SKELETON
Holds roughly a card's height so the page doesn't jump when the
data arrives. The shimmer is decoration, so it goes away for
anyone who has asked for less motion.
═══════════════════════════════════════════════════════════════ */
.skeleton {
min-height: 22rem;
background: linear-gradient(
100deg,
color-mix(in srgb, var(--color-muted) 8%, transparent) 30%,
color-mix(in srgb, var(--color-muted) 16%, transparent) 50%,
color-mix(in srgb, var(--color-muted) 8%, transparent) 70%
);
background-size: 200% 100%;
animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
from {
background-position: 200% 0;
}
to {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.skeleton {
animation: none;
}
}
/* ═══════════════════════════════════════════════════════════════
UNITY REGIONS
Append to index.css. Scoped to .ur- so nothing here reaches the
rest of the site.
═══════════════════════════════════════════════════════════════ */
/* The 0fr → 1fr grid row animates to the panel's real height, so
nobody has to guess a max-height that's wrong the moment a
region's description grows. The inline style sets the value;
this sets how it moves. */
.ur-panel {
display: grid;
transition: grid-template-rows 300ms ease;
}
.ur-chevron {
transition: transform 200ms ease;
}
@media (prefers-reduced-motion: reduce) {
.ur-panel,
.ur-chevron {
transition: none;
}
}
/* ═══════════════════════════════════════════════════════════════
ORGANIZATION LIST
Append to index.css. Scoped to .ol- so nothing here reaches the
rest of the site.
═══════════════════════════════════════════════════════════════ */
/* The 0fr → 1fr grid row animates to the panel's real height, so
nobody has to guess a max-height that's wrong the moment a
description grows. The inline style sets the value; this sets
how it moves. */
.ol-panel {
display: grid;
transition: grid-template-rows 300ms ease;
}
.ol-chevron {
transition: transform 200ms ease;
}
@media (prefers-reduced-motion: reduce) {
.ol-panel,
.ol-chevron {
transition: none;
}
}