/* Frameless Futures palette: calm, soft, accessible.
   Neutrals carry ~70% of the page, teal/blue accents ~20%, coral ~10%.

   Every colour on the site is a token here, and nothing below this block names
   one directly: that is what lets dark mode be a second set of values rather
   than a second stylesheet. Each token is a light-dark() pair, written once,
   so the two can never drift apart the way two copies of the palette would.

   Which half is used comes from `color-scheme` alone: the default below is
   `light dark`, meaning the system setting decides, and the nav bar's toggle
   pins it by putting data-theme on <html>. Nothing else in the stylesheet has
   to know which theme is showing.

   The dark half keeps each token's job -- a tint stays a tint, a state colour
   keeps its meaning. Its neutrals are the navy of --ink cooled and darkened
   rather than a flat grey, which holds the palette's temperature, and its
   accents come up in lightness as the background comes down, so teal and coral
   still read as themselves and still carry small type. */
:root {
	color-scheme: light dark;

	--bg: light-dark(#fafaf8, #12161f);
	--surface: light-dark(#ffffff, #1a1f2b);
	--ink: light-dark(#1f2a44, #e8eaf0);
	--muted: light-dark(#5b6579, #a3acc0);
	/* Body text on the saturated panels, where --muted is too dim to read
	   against a mid-tone fill and --ink is louder than the text deserves. */
	--ink-muted: light-dark(#2d3e54, #dfe2ea);
	--line: light-dark(#e6e4e0, #2c3342);
	/* The hairline inside a card, where --line would be too heavy. */
	--hairline: light-dark(rgba(31, 42, 68, 0.08), rgba(232, 234, 240, 0.12));

	--accent: light-dark(#7fc8c2, #6fb7b1);
	--accent-deep: light-dark(#4fa9a2, #8fd3cd);
	--accent-ink: light-dark(#2f6f6a, #9fdcd5);

	--coral: light-dark(#f28b82, #e08a82);
	--coral-deep: light-dark(#e0685e, #ef9f97);

	--info: light-dark(#a3c9e2, #7fa9c9);
	--pale-lavender: light-dark(#f4f1fa, #211f2e);
	--pale-mint: light-dark(#eef7f5, #16252a);
	--pale-peach: light-dark(#fff4ec, #2a1f1c);

	--error: light-dark(#b4443c, #ef8078);
	/* Text sitting on a filled accent, coral or error; and on an ink fill. Two
	   tokens rather than one white, because in dark mode the fills are the
	   light thing and the text on them has to go dark. */
	--on-accent: light-dark(#ffffff, #10151d);
	--on-ink: light-dark(#ffffff, #12161f);

	/* The panel tints, one step deeper than the pale ones above, which is what
	   every screen's panels and stat cards use. A token with no use left in the
	   sheet stays: this block mirrors the Figma token set, and dropping one
	   would make the two disagree. */
	--panel-info-bg: light-dark(#eaf2f9, #1b2735);
	--panel-peach-warm: light-dark(#fbece8, #8e5a50);
	--panel-peach-deep: light-dark(#fff1ee, #8e4a3f);
	--panel-lavender-deep: light-dark(#f1ebf7, #544b7b);
	--panel-mint-deep: light-dark(#e9f4f1, #3b676f);
	--panel-editor: light-dark(#fff3f0, #2a1e1d);
	--dev-gradient-mid: light-dark(#ffe3d3, #3a2620);
	/* A warm tone for hints and review notes: something to know, not an error. */
	--warm-ink: light-dark(#a8544c, #eaa79e);

	/* State pills: approved/active/running, rejected/banned/crashed, timed
	   out, stopped. */
	--state-good-bg: light-dark(#dff1ec, #156155);
	--state-bad-bg: light-dark(#fde4e1, #691c19);
	--state-warn-bg: light-dark(#fdf1cf, #775811);
	--state-warn-ink: light-dark(#7a5a12, #e8c877);
	--state-idle-bg: light-dark(#eeedea, #23272f);

	--chip-bg: light-dark(#f6f5f2, #222835);
	--chip-danger-bg: light-dark(#fdecea, #331f1d);
	--chip-danger-line: light-dark(#f5b8b2, #6b3a36);
	--switch-off: light-dark(#d7d9de, #3a4152);
	--track: light-dark(#f3f2ef, #232833);

	/* box-shadow is not a colour, so the pair lives in the colours it is built
	   from rather than in the shadow itself. Dark mode has no soft grey to cast
	   onto, so its shadows are near-black and carry more of the lifting. */
	--shadow-near: light-dark(rgba(31, 42, 68, 0.04), rgba(0, 0, 0, 0.4));
	--shadow-far: light-dark(rgba(31, 42, 68, 0.05), rgba(0, 0, 0, 0.45));
	--shadow-knob-colour: light-dark(rgba(31, 42, 68, 0.25), rgba(0, 0, 0, 0.5));
	--shadow-card: 0 1px 2px var(--shadow-near), 0 8px 24px var(--shadow-far);
	--shadow-knob: 0 1px 2px var(--shadow-knob-colour);
}

/* What the nav bar's toggle sets, and what the inline script in each page's
   head restores before the first paint so a chosen theme never flashes the
   other one first. */
:root[data-theme="light"] {
	color-scheme: light;
}

:root[data-theme="dark"] {
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--ink);
	font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Headings are set in a serif to match the palette sheet's editorial feel. */
h1,
h2,
h3 {
	font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
	padding: 2rem 1rem;
}

.home-title {
	margin: 0;
	font-size: 2.5rem;
	letter-spacing: -0.02em;
}

.home-lede {
	margin: 0;
	max-width: 34rem;
	text-align: center;
	color: var(--muted);
	font-size: 1.05rem;
}

/* The front page's two ways in: signing up is the call to action, signing in is
   the quieter one for people who already have an account. */
.home-actions {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
	justify-content: center;
}

/* The signed-in front page. Wider than a form card, since it is a landing place
   rather than something to fill in. */
.dashboard {
	width: 100%;
	max-width: 46rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.dashboard-title {
	margin: 0;
	font-size: 2rem;
	letter-spacing: -0.02em;
}

.dashboard-lede {
	margin: 0;
	color: var(--muted);
	font-size: 1.05rem;
}

.dashboard-panels {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1rem;
}

.dashboard-panel {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.dashboard-panel-title {
	margin: 0;
	font-size: 1.1rem;
}

.dashboard-panel-body {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

/* The lists on a community group's own dashboard: members, requests, invitations. Each
   row is a name and when it happened, which is all any of the three has to say
   until there is something to do about them. */
.people-list {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.people-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--line);
}

.people-row:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.people-name {
	font-weight: 600;
	/* A username is the user's own text, so it must not be able to push the
	   panel wider than its column. */
	overflow-wrap: anywhere;
}

.people-note {
	flex: none;
	color: var(--muted);
	font-size: 0.85rem;
}

/* The panel's way in -- pushed to the bottom so panels of different heights
   still line their buttons up, and only as wide as its own text. */
.dashboard-panel-action {
	margin-top: auto;
	padding-top: 0.75rem;
	align-self: flex-start;
	text-decoration: none;
}

.signup-card {
	width: 100%;
	max-width: 26rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	box-shadow: var(--shadow-card);
}

.signup-title {
	margin: 0;
	font-size: 1.5rem;
}

.signup-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.signup-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--muted);
}

.signup-input {
	font: inherit;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: inherit;
}

.signup-input::placeholder {
	color: var(--muted);
}

.signup-input:focus {
	outline: 2px solid var(--accent-deep);
	outline-offset: 1px;
	border-color: var(--accent-deep);
}

.signup-input:disabled {
	background: var(--pale-mint);
	color: var(--muted);
}

/* Signup questions -- the answers that bucket a new account into member or
   community group leader. The whole row is the label, so the hint text is clickable and
   the target is comfortably large. */
.signup-fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.signup-legend {
	padding: 0;
	margin-bottom: 0.35rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--muted);
}

/* A note attached to the field above it, rather than to a single choice. */
.signup-hint {
	margin: -0.5rem 0 0;
	color: var(--muted);
	font-size: 0.85rem;
}

/* A question and the fields it opens up, kept together so the gap between them
   is smaller than the gap to the next question -- which is what makes the
   address boxes read as belonging to the location answer. */
.signup-fieldset-group {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* The fields that only exist once a community group is said to meet somewhere. The rule
   on the left marks them as hanging off the answer above. */
.signup-subfields {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-left: 0.9rem;
	border-left: 2px solid var(--line);
}

.signup-choice {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface);
	cursor: pointer;
}

.signup-choice:hover {
	border-color: var(--accent);
}

.signup-choice:focus-within {
	outline: 2px solid var(--accent-deep);
	outline-offset: 1px;
	border-color: var(--accent-deep);
}

.signup-radio,
.signup-checkbox {
	margin: 0;
	flex: none;
	accent-color: var(--accent-deep);
	/* Sit at the vertical middle of the box whatever its height, so a choice
	   with a hint line lines up the same as a single-line one. */
	align-self: center;
}

.signup-choice-body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.signup-choice-label {
	font-size: 0.95rem;
}

.signup-choice-hint {
	font-size: 0.82rem;
	color: var(--muted);
}

/* The community group leader agreement appears only once leading is chosen, so it is
   tinted to read as a consequence of that answer rather than another option. */
.signup-terms {
	background: var(--pale-mint);
	border-color: var(--accent);
}

/* Buttons: pill-soft rounded rectangles, flat fills, no gradients.
   Primary is the teal accent; secondary is the coral accent. */
.signup-submit,
.home-cta,
.btn-primary,
.btn-secondary {
	font: inherit;
	font-weight: 600;
	padding: 0.75rem 1.5rem;
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: background-color 0.15s ease;
}

.signup-submit,
.home-cta,
.btn-primary {
	background: var(--accent);
	color: var(--on-accent);
}

.signup-submit:hover,
.home-cta:hover,
.btn-primary:hover {
	background: var(--accent-deep);
}

.btn-secondary {
	background: var(--coral);
	color: var(--on-accent);
}

.btn-secondary:hover {
	background: var(--coral-deep);
}

.signup-submit:focus-visible,
.home-cta:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.signup-submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* Text link: underlined, in the deepened teal so it reads as a link. */
.text-link {
	color: var(--accent-ink);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.text-link::after {
	content: " ›";
	text-decoration: none;
}

.signup-error {
	margin: 0;
	color: var(--error);
	font-size: 0.9rem;
}

.signup-success {
	margin: 0;
	color: var(--muted);
}

/* Soft-background panels from the palette, for future content sections. */
.panel-info {
	background: var(--panel-info-bg);
	border-radius: 14px;
	padding: 1.5rem;
}

.panel-lavender {
	background: var(--panel-lavender-deep);
	border-radius: 14px;
	padding: 1.5rem;
}

.panel-mint {
	background: var(--panel-mint-deep);
	border-radius: 14px;
	padding: 1.5rem;
}

.panel-peach {
	background: var(--panel-peach-deep);
	border-radius: 14px;
	padding: 1.5rem;
}

/* A panel with more than one thing to do: the same bottom-aligned place as
   .dashboard-panel-action, with room for the buttons to sit side by side. */
.dashboard-panel-actions {
	margin-top: auto;
	padding-top: 0.75rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
}

/* The small buttons inside a form -- adding and removing rows, choosing a file
   -- which must not compete with the form's own submit button. */
.btn-quiet {
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--accent-ink);
	cursor: pointer;
}

.btn-quiet:hover {
	border-color: var(--accent);
}

.btn-quiet:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.btn-quiet:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* The public page editor. It is the same card as the other forms, wider,
   because a description and a list of events need the room. */
.page-editor {
	max-width: 40rem;
}

.page-editor-note {
	margin: 0;
	color: var(--muted);
	font-size: 0.85rem;
}

.page-editor-textarea {
	min-height: 10rem;
	resize: vertical;
}

.page-editor-banner {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* Drawn at the poster's own proportions, so the leader sees how their picture
   will be cropped before anyone else does. */
.page-editor-banner-preview {
	width: 100%;
	aspect-ratio: 3 / 1;
	object-fit: cover;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	font-size: 0.9rem;
}

.page-editor-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
}

/* One link or one event: its boxes, and the button that removes it. */
.page-editor-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 0.6rem;
	padding: 0.9rem;
	border: 1px solid var(--line);
	border-radius: 10px;
}

.page-editor-row .btn-quiet {
	grid-column: 1 / -1;
	justify-self: start;
}

/* The community group's public page: a poster rather than a dashboard -- one card, the
   banner across the top, and everything else set out underneath it. */
.poster {
	width: 100%;
	max-width: 46rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: var(--shadow-card);
}

.poster-banner {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 1;
	object-fit: cover;
}

/* A page with no banner still gets the band across the top, so it reads as
   the same kind of page as one that has a picture. */
.poster-banner-blank {
	background: linear-gradient(120deg, var(--pale-mint) 0%, var(--pale-lavender) 55%, var(--pale-peach) 100%);
}

.poster-body {
	padding: 1.75rem 2rem 2.25rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Everything below is the leader's own text, so none of it may push the card
   wider than the screen. */
.poster-title {
	margin: 0;
	font-size: 2.25rem;
	line-height: 1.15;
	letter-spacing: -0.02em;
	overflow-wrap: anywhere;
}

.poster-tagline {
	margin: 0;
	font-size: 1.2rem;
	color: var(--accent-ink);
	overflow-wrap: anywhere;
}

.poster-facts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.poster-fact {
	background: var(--pale-mint);
	color: var(--accent-ink);
	border-radius: 999px;
	padding: 0.2rem 0.8rem;
	font-size: 0.9rem;
	font-weight: 600;
}

/* pre-line keeps the single line breaks inside a paragraph, which is how a
   leader would lay out an address-free "how to find us" or a list of times. */
.poster-about {
	margin: 0;
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.poster-section {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
}

.poster-section-title {
	margin: 0;
	font-size: 1.2rem;
}

.poster-events {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.poster-event {
	display: grid;
	grid-template-columns: 9rem 1fr;
	gap: 0.1rem 1rem;
	padding: 0.75rem 1rem;
	background: var(--pale-peach);
	border-radius: 10px;
}

.poster-event-date {
	grid-row: span 2;
	font-weight: 700;
}

.poster-event-title {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.poster-event-note {
	grid-column: 2;
	color: var(--muted);
	font-size: 0.9rem;
	overflow-wrap: anywhere;
}

.poster-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.poster-link {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--accent-ink);
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.poster-link:hover {
	border-color: var(--accent);
	background: var(--pale-mint);
}

/* Only ever seen by the owner, on a draft: says plainly that nobody else can
   see this yet, so a leader does not send the link out thinking it works. */
.poster-preview-note {
	margin: 0;
	width: 100%;
	max-width: 46rem;
	padding: 0.75rem 1rem;
	background: var(--pale-peach);
	border: 1px solid var(--coral);
	border-radius: 10px;
}

@media (max-width: 32rem) {
	.poster-body {
		padding: 1.25rem;
	}

	.poster-title {
		font-size: 1.8rem;
	}

	.poster-event {
		grid-template-columns: 1fr;
	}

	.poster-event-date {
		grid-row: auto;
	}

	.poster-event-note {
		grid-column: auto;
	}
}

/* Site header: rendered server-side so it is present in the first paint.

   Sticky rather than fixed, so it keeps its place in the body's flex column
   and nothing below has to guess its height. On a page too short to scroll it
   behaves exactly as before; on a longer one it stays pinned to the top of the
   window. Every variant of the header paints an opaque background, which is
   what keeps the content scrolling underneath from showing through, and the
   z-index lifts it over the positioned elements further down the page. */
.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 0.9rem 1.5rem;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}

/* The dev site wears a gradient the live site does not, so which of the two
   instances is on screen is answerable at a glance rather than from the URL.
   Peach into lavender: loud enough to be unmissable next to the flat white of
   the live header, still inside the palette rather than a warning stripe
   bolted on top of it.

   Only colour changes here. The dev site is meant to be what live is about to
   become, so its chrome must not move anything: same padding, same 1px border,
   same height, so nothing can look right on one instance and wrong on the
   other for a reason that is only this rule. */
.site-header.is-dev {
	background: linear-gradient(100deg, var(--pale-peach) 0%, var(--dev-gradient-mid) 45%, var(--pale-lavender) 100%);
	border-bottom-color: var(--coral);
}

/* The brand and, on the dev site, the badge beside it. Grouping them is what
   keeps the badge next to the name rather than adrift in the middle of a
   space-between header. */
.site-identity {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

/* Says which instance in words as well as in colour: colour alone is not an
   answer for someone who cannot see the difference between the two headers,
   and a screenshot of a bug report is worth more when it names the site it
   came from. --error rather than --coral behind white text, which the lighter
   coral does not have the contrast for at this size. */
.site-dev-badge {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--on-accent);
	background: var(--error);
	border-radius: 999px;
	padding: 0.15rem 0.55rem;
	white-space: nowrap;
}

.site-brand {
	font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: -0.01em;
	color: var(--ink);
	text-decoration: none;
}

.site-nav {
	display: flex;
	gap: 1.25rem;
	align-items: center;
}

/* The account corner of the nav. It is one element because Session.elm mounts
   onto it, and signed out it holds two links rather than one -- so it repeats
   the nav's own spacing for what sits inside it. */
.site-nav-account {
	display: flex;
	gap: 1.25rem;
	align-items: center;
}

.site-nav-link {
	color: var(--muted);
	text-decoration: none;
	font-size: 0.95rem;
	padding-bottom: 2px;
	border-bottom: 2px solid transparent;
}

.site-nav-link:hover {
	color: var(--ink);
}

.site-nav-link.is-active {
	color: var(--accent-ink);
	border-bottom-color: var(--accent);
}

/* "Sign Out" is a button, not a link, because it acts rather than navigates --
   it POSTs. These rules give it the geometry a <button> does not inherit, so it
   sits on the same baseline as its neighbours. */
.site-nav-signout {
	font: inherit;
	font-size: 0.95rem;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
}

/* The theme toggle. Deliberately the quietest thing in the nav bar: no fill,
   no outline until it is reached for, and a glyph the size of the links beside
   it, so it sits at the end of the row as one more nav item rather than a
   control competing with the page. The glyph shows what a press would give
   you -- a moon on the light theme, a sun on the dark one -- which is also
   what its label says for anyone who cannot see it. */
.site-theme-toggle {
	/* Without JavaScript the button cannot do anything, so theme.js is what
	   reveals it by putting .js-theme on <html>: the page follows the system
	   setting on its own, and an inert control would only be something to
	   press that does nothing. */
	display: none;
	align-items: center;
	justify-content: center;
	width: 1.9rem;
	height: 1.9rem;
	padding: 0;
	font: inherit;
	font-size: 0.95rem;
	line-height: 1;
	color: var(--muted);
	background: none;
	border: 1px solid transparent;
	border-radius: 999px;
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.site-theme-toggle:hover {
	color: var(--ink);
	border-color: var(--line);
	background: var(--surface);
}

.site-theme-toggle:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.js-theme .site-theme-toggle {
	display: inline-flex;
}

/* The body is a flex column filling the viewport, so the page area simply
   grows into whatever the header leaves rather than guessing the header's
   height. This keeps the pinned footer flush with the bottom of the window. */
.page {
	flex: 1 0 auto;
	min-height: 0;
}

/* Site footer: a thin bar echoing the header. It sits as a direct child of the
   body flex column, below .page, so it spans the full width edge to edge like
   the header and is held at the bottom of the window by .page growing to fill
   the space above it. */
.site-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.4rem 1.5rem;
	background: var(--surface);
	border-top: 1px solid var(--line);
}

/* The version is chrome, not content: a shade lighter than the muted text and
   a size down, so it reads as a quiet stamp rather than something to attend
   to. */
.site-version {
	font-size: 0.72rem;
	letter-spacing: 0.02em;
	color: var(--muted);
	opacity: 0.7;
}

/* The dashboard in the Figma direction: Cormorant Garamond for the display
   type, Figtree for everything else, a header that sits on the page ground
   rather than a white bar, and a wider left-aligned column of two equal
   panels. Scoped to .is-dashboard so the other pages keep their look until
   they are brought over too. The fallbacks are the site's existing stacks, so
   a blocked font request degrades to what the page looked like before. */
.is-dashboard {
	--display: "Cormorant Garamond", Georgia, "Iowan Old Style", "Times New Roman", serif;
	--sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-family: var(--sans);
}

.is-dashboard .site-header {
	padding: 1.25rem 5rem;
	background: var(--bg);
}

.is-dashboard .site-header.is-dev {
	background: linear-gradient(100deg, var(--pale-peach) 0%, var(--dev-gradient-mid) 45%, var(--pale-lavender) 100%);
}

.is-dashboard .site-brand {
	font-family: var(--display);
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: 0;
}

.is-dashboard .site-nav {
	gap: 2rem;
}

.is-dashboard .site-nav-link {
	color: var(--ink);
	font-size: 1rem;
}

.is-dashboard .site-nav-link.is-active {
	color: var(--accent-ink);
}

.is-dashboard .page {
	padding: 5rem 1.5rem 3rem;
}

.is-dashboard .dashboard {
	max-width: 62.5rem;
	gap: 0;
}

.is-dashboard .dashboard-title {
	font-family: var(--display);
	font-size: 3.25rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.is-dashboard .dashboard-lede {
	margin-top: 1.25rem;
	font-size: 1.05rem;
}

.is-dashboard .dashboard-panels {
	margin-top: 3.5rem;
	grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
	gap: 2rem;
}

.is-dashboard .dashboard-panel {
	gap: 1rem;
	padding: 2.25rem 2rem 2rem;
	border-radius: 16px;
}

/* The home dashboard's panels hold a sentence and a button each, so a floor
   on their height keeps the pair looking like a pair when one says less. */
.is-home-dashboard .dashboard-panel {
	min-height: 13.75rem;
}

/* Panel headings are set in the sans, not the display serif: at this size the
   serif reads as a second headline competing with the welcome. */
.is-dashboard .dashboard-panel-title {
	font-family: var(--sans);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.is-dashboard .dashboard-panel-body {
	color: var(--ink-muted);
	font-size: 1.05rem;
}

.is-dashboard .dashboard-panel-actions,
.is-dashboard .dashboard-panel-action {
	padding-top: 0.5rem;
}

.is-dashboard .btn-primary,
.is-dashboard .btn-secondary {
	padding: 0.6rem 1.75rem;
	border-radius: 8px;
	font-size: 0.95rem;
}

/* A group's own dashboard: the same frame, but its panels are lists rather
   than calls to action, so the type steps down a size and the rows become
   white cards on the tinted panel instead of ruled lines. */
.is-dashboard .dashboard-tag {
	margin: 0.75rem 0 0;
	align-self: flex-start;
	padding: 0.2rem 0.7rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 600;
}

.is-group-dashboard .dashboard-panel {
	gap: 0.75rem;
	padding: 1.75rem;
}

.is-group-dashboard .dashboard-panel-title {
	font-size: 1.25rem;
}

.is-group-dashboard .dashboard-panel-body {
	font-size: 0.95rem;
}

/* A softer peach than the admin queue's, so a group's own panels read as
   calmer than a moderation decision. */
.is-group-dashboard .panel-peach {
	background: var(--panel-peach-warm);
}

.is-group-dashboard .people-list {
	margin: 0;
	gap: 0.5rem;
}

.is-group-dashboard .people-row,
.is-group-dashboard .people-row:last-child {
	align-items: center;
	padding: 0.6rem 1rem;
	background: var(--bg);
	border: 0;
	border-radius: 8px;
}

.is-group-dashboard .people-name {
	font-size: 0.95rem;
}

.is-dashboard .dashboard-links {
	margin-top: 3.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 2rem;
}

.is-dashboard .dashboard-links .text-link {
	font-size: 0.95rem;
	text-decoration: none;
}

.is-dashboard .dashboard-links .text-link:hover {
	text-decoration: underline;
}

/* The public page editor in the same frame: one pale panel per question, the
   question as its heading, white borderless boxes inside. */
.editor {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.editor-head {
	display: flex;
	flex-direction: column;
	margin-bottom: 1.5rem;
}

.is-dashboard .editor-subtitle {
	margin: 0.5rem 0 0;
	font-family: var(--display);
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--muted);
	overflow-wrap: anywhere;
}

.editor-head .dashboard-lede {
	margin-top: 1rem;
}

.editor-panel {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.75rem;
	background: var(--surface);
	border-radius: 16px;
}

.is-dashboard .editor-panel-title {
	margin: 0;
	font-family: var(--sans);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--ink);
}

/* The panel is --surface and so is a box's default fill, so on the panel the
   boxes sink to the page colour instead: the well reads as inset rather than
   as another card sitting on this one. */
.editor-panel .signup-input {
	background: var(--bg);
	border-radius: 6px;
}

/* A warm tone for the hint, set apart from the panel's neutral without
   reading as an error, and dark enough that the small type still passes
   contrast on it. */
.editor-hint {
	margin: 0;
	font-size: 0.95rem;
	color: var(--warm-ink);
}

.editor-panel .page-editor-row {
	background: var(--surface);
	border: 0;
}

.editor-panel .page-editor-banner-preview {
	border: 0;
	background: var(--bg);
}

.editor-panel .signup-choice {
	border-color: transparent;
}

/* The start-a-group and sign-up forms answer questions with a set of choices
   rather than the editor's single publish toggle, so on their panels the rows
   keep their card border, and the chosen one is outlined in the accent. Their
   boxes keep their outline against the tint too, as the sign-in card's do. */
.is-create-group .editor-panel .signup-choice,
.is-signup .editor-panel .signup-choice {
	border-color: var(--line);
}

.is-create-group .editor-panel .signup-choice.is-chosen,
.is-signup .editor-panel .signup-choice.is-chosen {
	border-color: var(--accent-deep);
}

.is-signup .editor-panel .signup-input {
	border-color: var(--line);
}

.editor-footer {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}

/* Sign-in / sign-up in the dashboard direction: the whole short form on one
   raised panel -- the same surface as the page editor's -- with its heading in
   the display serif and its boxes sunk below it. */
.is-auth .signup-card {
	max-width: 28rem;
	padding: 2.5rem;
	gap: 1.25rem;
	background: var(--surface);
	border: 0;
	border-radius: 16px;
	box-shadow: none;
}

/* Sunk against the panel, for the same reason as the editor's. */
.is-auth .signup-input {
	background: var(--bg);
}

.is-auth .signup-title {
	font-family: var(--display);
	font-size: 2.25rem;
	margin-bottom: 0.5rem;
}

/* The public front page in the dashboard direction: a centred display-serif
   title, the two ways in, and the community illustration beneath them. */
.is-landing .page {
	padding: 8rem 1.5rem 5rem;
	gap: 0;
}

.is-landing .home-title {
	font-family: var(--display);
	font-size: 4rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-align: center;
}

.is-landing .home-lede {
	margin-top: 1.5rem;
	font-size: 1.25rem;
}

.is-landing .home-actions {
	margin-top: 2.5rem;
	gap: 1.5rem;
}

.is-landing .home-cta {
	padding: 0.6rem 1.75rem;
	border-radius: 8px;
	font-size: 0.95rem;
}

.is-landing .home-actions .text-link {
	font-size: 0.95rem;
	text-decoration: none;
}

.is-landing .home-actions .text-link:hover {
	text-decoration: underline;
}

.is-landing .home-hero {
	display: block;
	width: 100%;
	max-width: 50rem;
	height: auto;
	margin-top: 2.5rem;
	border: 1px solid var(--line);
	border-radius: 20px;
}

@media (max-width: 40rem) {
	.is-landing .page {
		padding-top: 4rem;
	}

	.is-landing .home-title {
		font-size: 2.75rem;
	}
}

/* The way to the other form, sitting under the card on the page ground. */
.auth-alt {
	margin: 0;
	color: var(--muted);
}

@media (max-width: 40rem) {
	.is-dashboard .site-header {
		padding: 1rem 1.5rem;
	}

	.is-dashboard .page {
		padding-top: 3rem;
	}

	.is-dashboard .dashboard-title {
		font-size: 2.4rem;
	}
}

/* Where review has got to, on the owner's dashboard and manage page. The warm
   tone of the editor's hints, so it reads as something to know rather than an
   error. */
.is-dashboard .dashboard-review-note {
	font-weight: 600;
	color: var(--warm-ink);
}

.is-group-dashboard .dashboard .dashboard-review-note {
	margin: 1rem 0 0;
}

/* The super admin's pages: the same frame as the dashboards, with the badge
   beside the brand saying whose view this is. Ink rather than a colour from
   the palette, so it cannot be mistaken for the dev site's badge. */
.site-admin-badge {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--on-ink);
	background: var(--ink);
	border-radius: 4px;
	padding: 0.2rem 0.5rem;
	white-space: nowrap;
}

/* The badge makes the brand's line longer than the ordinary header's, so on a
   phone the badges drop below the name rather than splitting it in two. */
.is-admin .site-identity {
	flex-wrap: wrap;
	row-gap: 0.35rem;
}

.is-admin .site-brand {
	white-space: nowrap;
}

.admin-title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
}

.admin-count {
	padding: 0.2rem 0.75rem;
	background: var(--panel-peach-deep);
	border: 1px solid var(--panel-peach-deep);
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	white-space: nowrap;
}

.admin-notice {
	margin: 2rem 0 0;
	padding: 0.75rem 1rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 3px solid var(--accent-deep);
	border-radius: 8px;
	font-size: 0.95rem;
}

/* The queue is one column of full-width cards rather than a grid of panels:
   each is a request to be read through before deciding, not a place to go. */
.request-list {
	margin-top: 2.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.is-admin .dashboard > .request-card {
	margin-top: 2.5rem;
}

/* Under the search and filters, the cards sit as close as they do to each
   other, so the toolbar reads as belonging to the list. */
.is-admin .directory-toolbar ~ .request-list,
.is-admin .dashboard > .directory-toolbar ~ .request-card {
	margin-top: 1.25rem;
}

.is-admin .request-card {
	padding: 1.75rem;
	border-radius: 16px;
}

.request-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--hairline);
}

.request-identity {
	flex: 1 1 20rem;
	min-width: 0;
	/* Clips the separator that starts each line of the meta row -- see below. */
	overflow: hidden;
}

.is-admin .request-name {
	margin: 0;
	font-family: var(--sans);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
}

/* Every item carries a separator in front of it, and the row is pulled left by
   exactly one separator's width so that whichever item starts a line has its
   separator clipped off by .request-identity. A long username wrapping the row
   then never leaves a stray bullet at the start of the next line. The separator
   sits in the item's own left padding, so an item too long for one line wraps
   its text past that column rather than into the clipped part. */
.request-meta {
	--meta-separator: 1.9rem;
	margin: 0.2rem 0 0 calc(-1 * var(--meta-separator));
	display: flex;
	flex-wrap: wrap;
	row-gap: 0.2rem;
	color: var(--ink-muted);
	font-size: 0.9rem;
}

.request-meta-item {
	position: relative;
	padding-left: var(--meta-separator);
}

.request-meta-item::before {
	content: "•";
	position: absolute;
	left: 0;
	width: var(--meta-separator);
	text-align: center;
}

/* Requester names are the requester's own text, so they must not be able to
   push the card wider than the page. */
.request-requester {
	color: var(--ink);
	font-weight: 600;
	overflow-wrap: anywhere;
}

.request-actions {
	flex: none;
	display: flex;
	gap: 0.75rem;
}

.request-actions form {
	margin: 0;
}

.is-admin .request-actions .btn-primary {
	padding: 0.6rem 1.25rem;
}

/* Line breaks in the description are the leader's layout, so they are kept. */
.request-description {
	margin: 1.25rem 0 0;
	color: var(--ink-muted);
	font-size: 0.95rem;
	line-height: 1.65;
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.request-description-missing {
	color: var(--muted);
	font-style: italic;
}

.request-empty {
	margin: 0;
}

/* A decided group has nothing left to press, so where the buttons were it says
   which way it went, in the directory's status colours. */
.request-state {
	flex-shrink: 0;
	padding: 0.25rem 0.65rem;
	border-radius: 4px;
	font-size: 0.8rem;
	font-weight: 600;
}

.request-state-approved {
	background: var(--state-good-bg);
	color: var(--accent-ink);
}

.request-state-rejected {
	background: var(--state-bad-bg);
	color: var(--ink);
}

/* The quieter of a pair of decisions: a sunk box beside the filled primary,
   turning coral on hover so it is clear which of the two is the refusal. */
.btn-outline {
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	padding: 0.6rem 1.25rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg);
	color: var(--muted);
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-outline:hover {
	border-color: var(--coral);
	color: var(--error);
}

.btn-outline:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

/* The user directory: one wide card holding a table, rather than a column of
   cards, because accounts are compared down a column rather than read one at a
   time. */
.is-dashboard .dashboard-wide {
	max-width: 75rem;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.directory-toolbar {
	margin-top: 2.5rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.directory-search {
	flex: 0 1 25rem;
	min-width: 0;
}

.directory-search-input {
	width: 100%;
	font-size: 0.95rem;
	padding: 0.75rem 1rem;
}

.directory-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.directory-chip {
	padding: 0.35rem 1rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--muted);
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.directory-chip:hover {
	border-color: var(--accent);
}

.directory-chip.is-active {
	background: var(--panel-mint-deep);
	border-color: var(--panel-mint-deep);
	color: var(--accent-ink);
}

.directory-card {
	margin-top: 1.25rem;
	padding: 0.75rem 1.75rem 1.75rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 20px;
}

/* On a phone the table keeps its columns and scrolls sideways inside the card,
   rather than squeezing an email address into a column two letters wide. */
.directory-scroll {
	overflow-x: auto;
}

.directory-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.directory-table th {
	padding: 1rem 1rem 1rem 0;
	border-bottom: 1px solid var(--line);
	color: var(--muted);
	font-weight: 500;
	text-align: left;
	white-space: nowrap;
}

.directory-table td {
	padding: 1.55rem 1rem 1.55rem 0;
	border-bottom: 1px solid var(--line);
	vertical-align: middle;
	white-space: nowrap;
}

.directory-table th:last-child,
.directory-table td:last-child {
	padding-right: 0;
}

.directory-table .directory-actions-head {
	text-align: right;
}

.directory-username {
	font-weight: 600;
}

.directory-muted {
	color: var(--muted);
}

.user-status {
	padding: 0.15rem 0.45rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
}

.user-status-active {
	background: var(--state-good-bg);
	color: var(--accent-ink);
}

.user-status-banned {
	background: var(--state-bad-bg);
	color: var(--ink);
}

.user-status-timeout {
	background: var(--state-warn-bg);
	color: var(--state-warn-ink);
	cursor: help;
}

.directory-table form {
	margin: 0;
}

/* The admin switch is a submit button drawn as a switch: flipping it posts the
   change, so it works without any JavaScript. */
.admin-switch {
	position: relative;
	display: block;
	width: 2.75rem;
	height: 1.5rem;
	padding: 0;
	margin: 0 auto;
	border: 0;
	border-radius: 999px;
	background: var(--switch-off);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.admin-switch::after {
	content: "";
	position: absolute;
	top: 0.2rem;
	left: 0.2rem;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: var(--surface);
	box-shadow: var(--shadow-knob);
	transition: transform 0.15s ease;
}

.admin-switch[aria-checked="true"] {
	background: var(--accent);
}

.admin-switch[aria-checked="true"]::after {
	transform: translateX(1.25rem);
}

.admin-switch:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.admin-switch:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.directory-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 0.5rem;
}

/* Smaller than .btn-outline: a row of these sits in every line of the table. */
.btn-chip {
	font: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	padding: 0.25rem 0.75rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--bg);
	color: var(--muted);
	cursor: pointer;
	white-space: nowrap;
}

.btn-chip:hover {
	border-color: var(--accent);
}

.btn-chip:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.btn-chip-danger {
	background: var(--panel-peach-deep);
	border-color: var(--panel-peach-deep);
	color: var(--ink);
}

.btn-chip-danger:hover {
	border-color: var(--coral);
}

.btn-chip-lift {
	color: var(--accent-ink);
}

.directory-you {
	color: var(--muted);
	font-size: 0.85rem;
}

.directory-empty {
	margin: 1rem 0 0;
	color: var(--muted);
}

.directory-pager {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	color: var(--muted);
	font-size: 0.9rem;
}

.directory-pager-links {
	display: flex;
	gap: 1.25rem;
}

.text-link-plain {
	color: var(--accent-ink);
	font-weight: 600;
	text-decoration: none;
}

.text-link-plain:hover {
	text-decoration: underline;
}

@media (max-width: 40rem) {
	.directory-card {
		padding: 0.5rem 1rem 1rem;
	}

	.directory-search {
		flex-basis: 100%;
	}
}

/* Three admin links and Sign Out do not fit a phone's width on one line, so the
   row wraps between links rather than inside them. */
.is-admin .site-nav {
	flex-wrap: wrap;
	row-gap: 0.5rem;
}

.is-admin .site-nav-link {
	white-space: nowrap;
}

/* The traffic page: a row of figures on the palette's tints, then the service's
   own uptime, then two cards side by side -- the busiest addresses in a table,
   and the busiest routes as bars. */
.traffic-as-of {
	margin: 0.5rem 0 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.traffic-stats {
	margin-top: 2.5rem;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
}

.traffic-stat {
	padding: 1.5rem;
	border-radius: 16px;
}

.traffic-stat-plain {
	background: var(--surface);
	border: 1px solid var(--line);
}

.is-admin .traffic-stat-label {
	margin: 0;
	font-family: var(--sans);
	font-size: 0.9rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--ink);
}

.is-admin .traffic-stat-label-accent {
	color: var(--accent-ink);
}

.is-admin .traffic-stat-label-muted {
	color: var(--muted);
}

.traffic-stat-value {
	margin: 0.5rem 0 0;
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
}

.traffic-stat-value-alert {
	color: var(--coral-deep);
}

.traffic-stat-note {
	margin: 0.6rem 0 0;
	color: var(--ink-muted);
	font-size: 0.85rem;
}

/* The one stat card on --surface rather than a panel tint: there the quieter
   grey reads fine and belongs with the rest of the page's small print. */
.traffic-stat-plain .traffic-stat-note {
	color: var(--muted);
}

.traffic-stat-note + .traffic-stat-note {
	margin-top: 0.2rem;
}

.traffic-panels {
	margin-top: 2.5rem;
	display: grid;
	grid-template-columns: minmax(0, 1.43fr) minmax(0, 1fr);
	align-items: start;
	gap: 2rem;
}

.traffic-card {
	padding: 1.75rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 20px;
}

.is-admin .traffic-card-title {
	margin: 0;
	font-family: var(--sans);
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.traffic-table {
	width: 100%;
	margin-top: 1rem;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.traffic-table th {
	padding: 0 1rem 0.75rem 0;
	border-bottom: 1px solid var(--line);
	color: var(--muted);
	font-weight: 500;
	text-align: left;
	white-space: nowrap;
}

.traffic-table td {
	padding: 1.1rem 1rem 0 0;
	white-space: nowrap;
}

.traffic-table th:last-child,
.traffic-table td:last-child {
	padding-right: 0;
}

.traffic-table .traffic-country {
	text-align: right;
}

.traffic-ip {
	font-weight: 600;
}

.traffic-route {
	color: var(--muted);
}

.traffic-empty {
	margin: 1rem 0 0;
	color: var(--muted);
}

.traffic-footnote {
	margin: 1.5rem 0 0;
	color: var(--muted);
	font-size: 0.8rem;
}

.endpoint-list {
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
}

.endpoint-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	font-size: 0.9rem;
}

/* Routes are the platform's own, but a long one must still not push the hits
   off the card. */
.endpoint-route {
	min-width: 0;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.endpoint-hits {
	flex: none;
	color: var(--muted);
	font-size: 0.85rem;
}

.endpoint-bar {
	margin-top: 0.4rem;
	height: 0.6rem;
	border-radius: 999px;
	background: var(--bg);
	overflow: hidden;
}

.endpoint-bar span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--accent);
}

.uptime-card {
	margin-top: 2rem;
}

.uptime-figures {
	margin: 1.25rem 0 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem 2rem;
}

.uptime-figure dt {
	color: var(--muted);
	font-size: 0.85rem;
}

.uptime-figure dd {
	margin: 0.25rem 0 0;
}

.uptime-value {
	display: block;
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.2;
}

.uptime-note {
	display: block;
	margin-top: 0.15rem;
	color: var(--muted);
	font-size: 0.85rem;
}

.run-state {
	padding: 0.15rem 0.45rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
}

.run-state-running {
	background: var(--state-good-bg);
	color: var(--accent-ink);
}

.run-state-stopped {
	background: var(--state-idle-bg);
	color: var(--muted);
}

.run-state-crashed {
	background: var(--state-bad-bg);
	color: var(--error);
	cursor: help;
}

@media (max-width: 64rem) {
	.traffic-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.traffic-panels {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 40rem) {
	.traffic-stats,
	.uptime-figures {
		grid-template-columns: minmax(0, 1fr);
	}

	.traffic-card {
		padding: 1.25rem 1rem;
	}
}
