move css to own file

This commit is contained in:
nate 2026-04-09 06:46:22 +04:00
parent 2db6c3402c
commit ce36957ba3
3 changed files with 164 additions and 141 deletions

View File

@ -19,12 +19,18 @@ const eta = new Eta({ views: resolve(import.meta.dir, "./views"), cache: true, d
const PUBLIC_BASE = process.env.STATUS_BASE_URL ?? "https://status.pingql.com"; const PUBLIC_BASE = process.env.STATUS_BASE_URL ?? "https://status.pingql.com";
// Hash the static expand.js so the URL changes whenever its bytes change. // Hash the static assets so their URLs change whenever their bytes change.
// Used as a cache-busting query string on the <script src=...> tag. // Used as cache-busting query strings on the <link>/<script> tags so visitors
// always pull the freshest CSS/JS even with the long-lived `immutable`
// Cache-Control we set on the asset routes below.
const expandJsPath = resolve(import.meta.dir, "./static/expand.js"); const expandJsPath = resolve(import.meta.dir, "./static/expand.js");
const expandJsBytes = await Bun.file(expandJsPath).bytes(); const expandJsBytes = await Bun.file(expandJsPath).bytes();
const expandJsHash = createHash("md5").update(expandJsBytes).digest("hex").slice(0, 8); const expandJsHash = createHash("md5").update(expandJsBytes).digest("hex").slice(0, 8);
const appCssPath = resolve(import.meta.dir, "./static/app.css");
const appCssBytes = await Bun.file(appCssPath).bytes();
const appCssHash = createHash("md5").update(appCssBytes).digest("hex").slice(0, 8);
function clientIp(req: Request): string { function clientIp(req: Request): string {
return req.headers.get("x-forwarded-for")?.split(",")[0]?.trim() return req.headers.get("x-forwarded-for")?.split(",")[0]?.trim()
|| req.headers.get("cf-connecting-ip") || req.headers.get("cf-connecting-ip")
@ -67,7 +73,7 @@ async function renderHtml(slug: string, request: Request): Promise<Response> {
} }
const payload = await cached(`payload:${slug}`, 15, () => loadPagePayload(slug)); const payload = await cached(`payload:${slug}`, 15, () => loadPagePayload(slug));
if (!payload) return notFound(); if (!payload) return notFound();
const html = eta.render("page", { ...payload, expandJsHash }); const html = eta.render("page", { ...payload, expandJsHash, appCssHash });
const headers: Record<string, string> = { const headers: Record<string, string> = {
"content-type": "text/html; charset=utf-8", "content-type": "text/html; charset=utf-8",
"cache-control": "public, max-age=15, s-maxage=15", "cache-control": "public, max-age=15, s-maxage=15",
@ -120,6 +126,16 @@ const app = new Elysia()
}, },
})) }))
// Static app.css — same caching contract as expand.js. The query string in
// the <link> tag is the file's MD5 hash, so deploys propagate immediately
// even though the asset itself is marked immutable for a year.
.get("/_static/app.css", () => new Response(Bun.file(appCssPath), {
headers: {
"content-type": "text/css; charset=utf-8",
"cache-control": "public, max-age=31536000, immutable",
},
}))
// Single public route — dispatches HTML / JSON / RSS by extension on the slug. // Single public route — dispatches HTML / JSON / RSS by extension on the slug.
.get("/:slug", async ({ params, request, query }) => { .get("/:slug", async ({ params, request, query }) => {
const { slug, format } = splitSlugAndFormat(params.slug); const { slug, format } = splitSlugAndFormat(params.slug);

View File

@ -0,0 +1,143 @@
/* Public status page styles. Served as a static asset with a hash-busted
query string (see apps/status/src/index.ts), so changes here propagate to
visitors as soon as the new bundle is deployed.
Per-page custom CSS is still inlined in page.ejs (it's per-request data,
not a build artifact) kept in a separate <style> block AFTER this
file is loaded so it always wins on specificity ties. */
:root {
--bg: #ffffff; --fg: #1e293b; --muted: #64748b; --card: #f8fafc;
--border: #e2e8f0; --accent: #0284c7;
--bar-up: #10b981; --bar-down: #ef4444; --bar-partial: #f59e0b; --bar-empty: #e5e7eb;
--bar-paused: #6366f1;
--overall-fg: #ffffff;
}
/* OLED-friendly dark mode: pure black background for power saving, but a
muted slate-300 foreground instead of white so it doesn't blow out on
self-emissive displays. */
html.dark, html:not(.light):not(.dark) { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
html:not(.light) {
--bg: #0a0a0a; --fg: #c2c8d0; --muted: #6b7280; --card: #131418;
--border: #1f2026; --accent: #3b9bd1;
--bar-up: #1f8f6e; --bar-down: #c84a4a; --bar-partial: #c98a2c; --bar-empty: #1f2026; --bar-paused: #5b6cb8;
--overall-fg: #f1f5f9;
}
}
html.dark {
--bg: #0a0a0a; --fg: #c2c8d0; --muted: #6b7280; --card: #131418;
--border: #1f2026; --accent: #3b9bd1;
--bar-up: #1f8f6e; --bar-down: #c84a4a; --bar-partial: #c98a2c; --bar-empty: #1f2026; --bar-paused: #5b6cb8;
--overall-fg: #f1f5f9;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; line-height: 1.5; }
main { max-width: 880px; margin: 0 auto; padding: 3rem 1.5rem; }
h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 0.5rem; }
.title-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.title-row h1 { margin: 0; }
.rss-link { color: var(--muted); display: inline-flex; align-items: center; transition: color 0.15s; }
.rss-link:hover { color: #f59e0b; }
.muted { color: var(--muted); font-size: 0.875rem; }
.overall { padding: 1rem 1.25rem; border-radius: 10px; color: var(--overall-fg); font-weight: 600; font-size: 1rem; margin: 1.5rem 0 2rem; display: flex; align-items: center; gap: 0.75rem; }
.overall .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--overall-fg); opacity: 0.9; }
.group-title { font-size: 0.85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 2rem 0 0.75rem; }
.monitors { display: flex; flex-direction: column; gap: 0.5rem; }
/* All monitors share one structure: a clickable header row + a collapsible
detail panel. display_mode just controls whether `expanded-state` is set
on initial render. */
.monitor { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 0; overflow: hidden; }
.monitor-name { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.monitor-name .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.monitor-name .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-meta { display: flex; gap: 1rem; align-items: center; font-size: 0.85rem; color: var(--muted); }
.uptime-pct { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--fg); }
.maintenance-pill {
display: inline-flex; align-items: center; gap: 0.3rem;
padding: 0.15rem 0.55rem; border-radius: 999px;
font-size: 0.7rem; font-weight: 600;
color: var(--bar-paused); border: 1px solid var(--bar-paused);
background: transparent; text-transform: uppercase; letter-spacing: 0.04em;
}
.bars { display: flex; gap: 0.1rem; height: 32px; margin-top: 0.75rem; align-items: stretch; position: relative; }
.bar { flex: 1; min-width: 0; border-radius: 2px; transition: opacity 0.15s; }
.bar:hover { opacity: 0.8; }
.bars-meta { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--muted); margin-top: 0.4rem; }
/* Tooltip shown when hovering a bar. Single floating element per page, positioned by JS. */
#bar-tooltip { position: fixed; pointer-events: none; background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 0.75rem; font-size: 0.75rem; color: var(--fg); box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 100; min-width: 160px; transform: translate(-50%, -100%); margin-top: -8px; display: none; }
#bar-tooltip .head { color: var(--muted); margin-bottom: 0.25rem; font-size: 0.7rem; }
#bar-tooltip .row { display: flex; justify-content: space-between; gap: 1rem; }
#bar-tooltip .row span:last-child { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
#bar-tooltip .pct.good { color: var(--bar-up); }
#bar-tooltip .pct.warn { color: var(--bar-partial); }
#bar-tooltip .pct.bad { color: var(--bar-down); }
/* Multi-window uptime row: four labelled cells side by side. */
.uptime-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.uptime-cell { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 0.65rem; }
.uptime-cell .label { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.uptime-cell .value { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.95rem; }
.uptime-cell.good .value { color: var(--bar-up); }
.uptime-cell.warn .value { color: var(--bar-partial); }
.uptime-cell.bad .value { color: var(--bar-down); }
.uptime-cell.empty .value { color: var(--muted); }
/* Header row is always clickable; detail panel collapses/expands. */
.monitor-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; cursor: pointer; background: transparent; border: none; color: inherit; width: 100%; text-align: left; font-family: inherit; font-size: inherit; }
.monitor-row:hover { background: rgba(255,255,255,0.02); }
.monitor-row .chev { color: var(--muted); transition: transform 0.15s; flex-shrink: 0; }
.monitor.expanded-state .monitor-row .chev { transform: rotate(90deg); }
.monitor-detail { padding: 0 1.25rem 1rem; border-top: 1px solid var(--border); display: none; }
.monitor.expanded-state .monitor-detail { display: block; padding-top: 1rem; }
.regions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; font-size: 0.75rem; }
.region { padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--border); }
.region.up { color: var(--green); border-color: rgba(16,185,129,0.3); }
.region.down { color: var(--red); border-color: rgba(239,68,68,0.3); }
.incidents { margin-bottom: 2rem; }
.incident { background: var(--card); border-left: 4px solid var(--bar-partial); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.incident.critical { border-left-color: var(--bar-down); }
.incident.major { border-left-color: var(--bar-partial); }
.incident.minor { border-left-color: var(--muted); }
.incident.resolved { border-left-color: var(--bar-up); opacity: 0.85; }
.incident-title { font-weight: 600; margin-bottom: 0.25rem; }
.incident-meta { color: var(--muted); font-size: 0.8rem; margin-bottom: 0.5rem; }
.incident-meta .pill { display: inline-block; padding: 0.05rem 0.4rem; border-radius: 999px; border: 1px solid var(--border); margin-right: 0.4rem; text-transform: capitalize; }
.incident-meta .pill.investigating { color: var(--bar-partial); border-color: rgba(245,158,11,0.3); }
.incident-meta .pill.identified { color: var(--bar-partial); border-color: rgba(245,158,11,0.3); }
.incident-meta .pill.monitoring { color: var(--accent); border-color: rgba(14,165,233,0.3); }
.incident-meta .pill.resolved { color: var(--bar-up); border-color: rgba(16,185,129,0.3); }
/* Full incident timeline (newest at top). One block per update. */
.incident-timeline { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.incident-update { padding: 0.5rem 0; border-bottom: 1px dashed var(--border); }
.incident-update:last-child { border-bottom: none; padding-bottom: 0; }
.incident-update .head { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }
.incident-update .head .status { display: inline-block; padding: 0.05rem 0.4rem; border-radius: 4px; font-weight: 600; text-transform: capitalize; margin-right: 0.4rem; }
.incident-update .head .status.investigating { background: rgba(245,158,11,0.15); color: var(--bar-partial); }
.incident-update .head .status.identified { background: rgba(245,158,11,0.15); color: var(--bar-partial); }
.incident-update .head .status.monitoring { background: rgba(14,165,233,0.15); color: var(--accent); }
.incident-update .head .status.resolved { background: rgba(16,185,129,0.15); color: var(--bar-up); }
.incident-update .body { font-size: 0.875rem; }
.incident-update .body p { margin: 0.25rem 0; }
.incident-update .body code { background: var(--bg); padding: 0.1em 0.3em; border-radius: 3px; font-size: 0.85em; }
.past-incidents { margin-top: 3rem; }
.past-incidents h2 { font-size: 1.1rem; margin-bottom: 1rem; }
/* Past incidents — Atlassian-style: grouped by date with light typography. */
.past-day { margin-bottom: 2rem; }
.past-day-header { font-size: 0.95rem; font-weight: 600; color: var(--fg); padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); margin: 0 0 1rem; }
.past-day-empty { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 0; }
.past-item { margin-bottom: 1.25rem; }
.past-item:last-child { margin-bottom: 0; }
.past-item-title { font-size: 0.95rem; font-weight: 600; color: var(--fg); margin: 0 0 0.5rem; }
.past-update { font-size: 0.8rem; line-height: 1.55; color: var(--fg); padding-left: 0.75rem; border-left: 2px solid var(--border); margin-bottom: 0.5rem; }
.past-update:last-child { margin-bottom: 0; }
.past-update-status { font-weight: 600; text-transform: capitalize; }
.past-update-status.investigating { color: var(--bar-partial); }
.past-update-status.identified { color: var(--bar-partial); }
.past-update-status.monitoring { color: var(--accent); }
.past-update-status.resolved { color: var(--bar-up); }
.past-update-body { color: var(--fg); }
.past-update-body p { display: inline; margin: 0; }
.past-update-body code { background: var(--bg); padding: 0.05em 0.3em; border-radius: 3px; font-size: 0.85em; }
.past-update-time { color: var(--muted); font-size: 0.7rem; margin-top: 0.15rem; }
footer { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.8rem; text-align: center; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

View File

@ -89,144 +89,8 @@
<% if (page.og_image_url) { %><meta property="og:image" content="<%= page.og_image_url %>"><% } %> <% if (page.og_image_url) { %><meta property="og:image" content="<%= page.og_image_url %>"><% } %>
<link rel="alternate" type="application/rss+xml" title="<%= page.title %> incidents" href="/<%= page.slug %>.rss"> <link rel="alternate" type="application/rss+xml" title="<%= page.title %> incidents" href="/<%= page.slug %>.rss">
<link rel="manifest" href="/<%= page.slug %>/manifest.json"> <link rel="manifest" href="/<%= page.slug %>/manifest.json">
<style> <link rel="stylesheet" href="/_static/app.css?v=<%= it.appCssHash %>">
:root { <% if (page.custom_css) { %><style><%~ page.custom_css %></style><% } %>
--bg: #ffffff; --fg: #1e293b; --muted: #64748b; --card: #f8fafc;
--border: #e2e8f0; --accent: #0284c7;
--bar-up: #10b981; --bar-down: #ef4444; --bar-partial: #f59e0b; --bar-empty: #e5e7eb;
--bar-paused: #6366f1;
--overall-fg: #ffffff;
}
/* OLED-friendly dark mode: pure black background for power saving, but a
muted slate-300 foreground instead of white so it doesn't blow out on
self-emissive displays. */
html.dark, html:not(.light):not(.dark) { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
html:not(.light) {
--bg: #0a0a0a; --fg: #c2c8d0; --muted: #6b7280; --card: #131418;
--border: #1f2026; --accent: #3b9bd1;
--bar-up: #1f8f6e; --bar-down: #c84a4a; --bar-partial: #c98a2c; --bar-empty: #1f2026; --bar-paused: #5b6cb8;
--overall-fg: #f1f5f9;
}
}
html.dark {
--bg: #0a0a0a; --fg: #c2c8d0; --muted: #6b7280; --card: #131418;
--border: #1f2026; --accent: #3b9bd1;
--bar-up: #1f8f6e; --bar-down: #c84a4a; --bar-partial: #c98a2c; --bar-empty: #1f2026; --bar-paused: #5b6cb8;
--overall-fg: #f1f5f9;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; line-height: 1.5; }
main { max-width: 880px; margin: 0 auto; padding: 3rem 1.5rem; }
h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 0.5rem; }
.title-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.title-row h1 { margin: 0; }
.rss-link { color: var(--muted); display: inline-flex; align-items: center; transition: color 0.15s; }
.rss-link:hover { color: #f59e0b; }
.muted { color: var(--muted); font-size: 0.875rem; }
.overall { padding: 1rem 1.25rem; border-radius: 10px; color: var(--overall-fg); font-weight: 600; font-size: 1rem; margin: 1.5rem 0 2rem; display: flex; align-items: center; gap: 0.75rem; }
.overall .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--overall-fg); opacity: 0.9; }
.group-title { font-size: 0.85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 2rem 0 0.75rem; }
.monitors { display: flex; flex-direction: column; gap: 0.5rem; }
/* All monitors share one structure: a clickable header row + a collapsible
detail panel. display_mode just controls whether `expanded-state` is set
on initial render. */
.monitor { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 0; overflow: hidden; }
.monitor-name { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.monitor-name .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.monitor-name .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-meta { display: flex; gap: 1rem; align-items: center; font-size: 0.85rem; color: var(--muted); }
.uptime-pct { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--fg); }
.maintenance-pill {
display: inline-flex; align-items: center; gap: 0.3rem;
padding: 0.15rem 0.55rem; border-radius: 999px;
font-size: 0.7rem; font-weight: 600;
color: var(--bar-paused); border: 1px solid var(--bar-paused);
background: transparent; text-transform: uppercase; letter-spacing: 0.04em;
}
.bars { display: flex; gap: 0.1rem; height: 32px; margin-top: 0.75rem; align-items: stretch; position: relative; }
.bar { flex: 1; min-width: 0; border-radius: 2px; transition: opacity 0.15s; }
.bar:hover { opacity: 0.8; }
.bars-meta { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--muted); margin-top: 0.4rem; }
/* Tooltip shown when hovering a bar. Single floating element per page, positioned by JS. */
#bar-tooltip { position: fixed; pointer-events: none; background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 0.75rem; font-size: 0.75rem; color: var(--fg); box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 100; min-width: 160px; transform: translate(-50%, -100%); margin-top: -8px; display: none; }
#bar-tooltip .head { color: var(--muted); margin-bottom: 0.25rem; font-size: 0.7rem; }
#bar-tooltip .row { display: flex; justify-content: space-between; gap: 1rem; }
#bar-tooltip .row span:last-child { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
#bar-tooltip .pct.good { color: var(--bar-up); }
#bar-tooltip .pct.warn { color: var(--bar-partial); }
#bar-tooltip .pct.bad { color: var(--bar-down); }
/* Multi-window uptime row: four labelled cells side by side. */
.uptime-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.uptime-cell { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 0.65rem; }
.uptime-cell .label { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.uptime-cell .value { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.95rem; }
.uptime-cell.good .value { color: var(--bar-up); }
.uptime-cell.warn .value { color: var(--bar-partial); }
.uptime-cell.bad .value { color: var(--bar-down); }
.uptime-cell.empty .value { color: var(--muted); }
/* Header row is always clickable; detail panel collapses/expands. */
.monitor-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; cursor: pointer; background: transparent; border: none; color: inherit; width: 100%; text-align: left; font-family: inherit; font-size: inherit; }
.monitor-row:hover { background: rgba(255,255,255,0.02); }
.monitor-row .chev { color: var(--muted); transition: transform 0.15s; flex-shrink: 0; }
.monitor.expanded-state .monitor-row .chev { transform: rotate(90deg); }
.monitor-detail { padding: 0 1.25rem 1rem; border-top: 1px solid var(--border); display: none; }
.monitor.expanded-state .monitor-detail { display: block; padding-top: 1rem; }
.regions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; font-size: 0.75rem; }
.region { padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--border); }
.region.up { color: var(--green); border-color: rgba(16,185,129,0.3); }
.region.down { color: var(--red); border-color: rgba(239,68,68,0.3); }
.incidents { margin-bottom: 2rem; }
.incident { background: var(--card); border-left: 4px solid var(--bar-partial); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.incident.critical { border-left-color: var(--bar-down); }
.incident.major { border-left-color: var(--bar-partial); }
.incident.minor { border-left-color: var(--muted); }
.incident.resolved { border-left-color: var(--bar-up); opacity: 0.85; }
.incident-title { font-weight: 600; margin-bottom: 0.25rem; }
.incident-meta { color: var(--muted); font-size: 0.8rem; margin-bottom: 0.5rem; }
.incident-meta .pill { display: inline-block; padding: 0.05rem 0.4rem; border-radius: 999px; border: 1px solid var(--border); margin-right: 0.4rem; text-transform: capitalize; }
.incident-meta .pill.investigating { color: var(--bar-partial); border-color: rgba(245,158,11,0.3); }
.incident-meta .pill.identified { color: var(--bar-partial); border-color: rgba(245,158,11,0.3); }
.incident-meta .pill.monitoring { color: var(--accent); border-color: rgba(14,165,233,0.3); }
.incident-meta .pill.resolved { color: var(--bar-up); border-color: rgba(16,185,129,0.3); }
/* Full incident timeline (newest at top). One block per update. */
.incident-timeline { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.incident-update { padding: 0.5rem 0; border-bottom: 1px dashed var(--border); }
.incident-update:last-child { border-bottom: none; padding-bottom: 0; }
.incident-update .head { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }
.incident-update .head .status { display: inline-block; padding: 0.05rem 0.4rem; border-radius: 4px; font-weight: 600; text-transform: capitalize; margin-right: 0.4rem; }
.incident-update .head .status.investigating { background: rgba(245,158,11,0.15); color: var(--bar-partial); }
.incident-update .head .status.identified { background: rgba(245,158,11,0.15); color: var(--bar-partial); }
.incident-update .head .status.monitoring { background: rgba(14,165,233,0.15); color: var(--accent); }
.incident-update .head .status.resolved { background: rgba(16,185,129,0.15); color: var(--bar-up); }
.incident-update .body { font-size: 0.875rem; }
.incident-update .body p { margin: 0.25rem 0; }
.incident-update .body code { background: var(--bg); padding: 0.1em 0.3em; border-radius: 3px; font-size: 0.85em; }
.past-incidents { margin-top: 3rem; }
.past-incidents h2 { font-size: 1.1rem; margin-bottom: 1rem; }
/* Past incidents — Atlassian-style: grouped by date with light typography. */
.past-day { margin-bottom: 2rem; }
.past-day-header { font-size: 0.95rem; font-weight: 600; color: var(--fg); padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); margin: 0 0 1rem; }
.past-day-empty { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 0; }
.past-item { margin-bottom: 1.25rem; }
.past-item:last-child { margin-bottom: 0; }
.past-item-title { font-size: 0.95rem; font-weight: 600; color: var(--fg); margin: 0 0 0.5rem; }
.past-update { font-size: 0.8rem; line-height: 1.55; color: var(--fg); padding-left: 0.75rem; border-left: 2px solid var(--border); margin-bottom: 0.5rem; }
.past-update:last-child { margin-bottom: 0; }
.past-update-status { font-weight: 600; text-transform: capitalize; }
.past-update-status.investigating { color: var(--bar-partial); }
.past-update-status.identified { color: var(--bar-partial); }
.past-update-status.monitoring { color: var(--accent); }
.past-update-status.resolved { color: var(--bar-up); }
.past-update-body { color: var(--fg); }
.past-update-body p { display: inline; margin: 0; }
.past-update-body code { background: var(--bg); padding: 0.05em 0.3em; border-radius: 3px; font-size: 0.85em; }
.past-update-time { color: var(--muted); font-size: 0.7rem; margin-top: 0.15rem; }
footer { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.8rem; text-align: center; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
<% if (page.custom_css) { %><%~ page.custom_css %><% } %>
</style>
<% if (page.analytics_html) { %><%~ page.analytics_html %><% } %> <% if (page.analytics_html) { %><%~ page.analytics_html %><% } %>
</head> </head>
<body> <body>