/* status.ciphera.net: the whole stylesheet.
 *
 * Hand-written rather than generated, because this service has no build step and
 * no node_modules by design. The design is the options round of 07-11-2026
 * (OPS-40; plan Status/docs/plans/07-11-2026-status-page-redesign.md §2), built
 * from the estate's own pieces: the Ciphera cube and the product marks, Facet's
 * palette, and Pulse's uptime colours.
 *
 * 🔴 THE PALETTE IS COPIED AS LITERALS. This page cannot import
 * @ciphera-net/facet: it is a Go binary with no JavaScript toolchain, which is
 * the point (see cmd/server/main.go). If Facet's palette moves, this file does
 * not. Sources of truth: UI/facet/packages/facet/src/styles/facet.css, and
 * pulse-frontend components/uptime/uptimeMetrics.ts for the three state colours.
 */

/* ⚠️ SELF-HOSTED, NOT GOOGLE FONTS. The estate's rule is no US companies in the
 * critical path, and the critical path of THIS page matters most: it is what
 * people read when the rest is broken. One variable file covers every weight
 * used here. Licensed SIL OFL 1.1 (see GEIST-LICENSE.txt). */
@font-face {
  font-family: "Geist";
  src: url("/static/a369fcf5628e/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Facet dark */
  --background: #0a0a0a;
  --foreground: #f4f4f4;
  --card: #0f0f0f;
  --border: #1c1c1c;
  --line-strong: #242424;
  --muted-foreground: #8a8a8a;
  --n300: #d4d4d4;
  --n400: #a3a3a3;
  --n500: #737373;
  --n600: #525252;
  --n700: #404040;
  /* Brand orange, in ONE place: the edge of an open incident. */
  --orange: #fd5e0f;
  /* Pulse's uptime state colours, exactly (UPTIME_POS / NEG / DEGRADED), so a
   * day on this page and a day on Pulse's uptime page are the same colour. */
  --pos: #3ecf8e;
  --neg: #f8836b;
  --deg: #fbbf24;
  /* A healthy day at 0.75, as Pulse's availability strip draws it; a problem
   * day at full strength, so it stands out. */
  --day-ok: rgba(62, 207, 142, .75);
  /* An unobserved day: faint, never green. */
  --day-none: rgba(255, 255, 255, .045);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.muted { color: var(--muted-foreground); }
.wrap { max-width: 56rem; margin: 0 auto; padding: 0 1.5rem; }

/* ── header: "Ciphera | Status" (option B) ───────────────────────────────── */
.hdr { border-bottom: 1px solid var(--border); }
.hdr-in { height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .625rem; text-decoration: none; }
.mark { height: 28px; width: auto; display: block; flex: none; }
.word { font-size: 17px; font-weight: 600; letter-spacing: -0.025em; }
.word.muted { font-weight: 500; }
.brand .bar { width: 1px; height: 18px; background: var(--line-strong); margin: 0 .125rem; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { font-size: 14px; color: var(--muted-foreground); text-decoration: none; }
.nav a:hover { color: var(--foreground); }
.nav .btn { border: 1px solid var(--line-strong); padding: 6px 12px; color: var(--foreground); font-weight: 500; }
.nav .btn:hover { border-color: var(--n700); }

/* ── the status dot ──────────────────────────────────────────────────────── */
.dot {
  width: 8px; height: 8px;
  border-radius: 9999px;   /* the ONE exemption in Facet's radius contract, which is 0 everywhere else */
  display: inline-block;
  flex: none;
  background: var(--n600);
}
.dot.lg { width: 12px; height: 12px; }
.dot-ok       { background: var(--pos); }
.dot-degraded { background: var(--deg); }
.dot-outage   { background: var(--neg); }
.dot-unknown  { background: var(--n600); }

/* ── summary: the state is the headline (option A) ───────────────────────── */
.sum { margin: 3.5rem 0 2.75rem; }
.sum h1 {
  margin: 0;
  display: flex; align-items: center; gap: .875rem;
  font-size: 2.25rem; line-height: 2.75rem;
  font-weight: 600;          /* never 700, Facet rule */
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.sum .meta { margin: .625rem 0 0; font-size: 14px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

/* ── notices: an open incident or planned maintenance (option N1) ────────── */
.note { position: relative; margin: 0 0 1rem; padding: 16px 18px 16px 20px; border: 1px solid var(--border); background: var(--card); }
.note::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 2px; background: var(--n700); }
.note-inc::before { background: var(--orange); }
.note + .grp { margin-top: 2.25rem; }
.nh { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 13px; }
.ns { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.ns.dot-degraded { color: var(--deg); background: none; }
.ns.dot-outage   { color: var(--neg); background: none; }
.ns.dot-unknown  { color: var(--foreground); background: none; }
.nt { color: var(--n500); font-variant-numeric: tabular-nums; }
.ntitle { margin: 8px 0 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.naff { margin: 2px 0 0; font-size: 12px; color: var(--n500); }
/* the notice's updates, newest first, as a small timeline */
.tlm { list-style: none; margin: 12px 0 0; padding: 0 0 0 16px; border-left: 1px solid var(--line-strong); display: grid; gap: 8px; }
.tlm li { position: relative; display: grid; grid-template-columns: 6rem 6.5rem minmax(0, 1fr); gap: .75rem; font-size: 13px; line-height: 20px; }
.tlm li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 7px; height: 7px; border-radius: 9999px; background: var(--n600); box-shadow: 0 0 0 3px var(--card); }
.tlm li:first-child::before { background: var(--n300); }
.tlm-t { color: var(--n500); font-variant-numeric: tabular-nums; }
.tlm-s { font-weight: 500; }
.tlm-m { color: var(--n300); }

/* ── groups and services (rows option B, green) ──────────────────────────── */
.grp { margin: 0 0 2rem; }
.grp-h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .75rem; }
.gl { display: flex; align-items: center; gap: .625rem; }
.gmark { width: 20px; height: 20px; object-fit: contain; display: block; }
.grp-h h2 { margin: 0; font-size: 14px; font-weight: 600; }
.gr { display: flex; align-items: center; gap: .5rem; font-size: 13px; color: var(--muted-foreground); }
.panel { position: relative; border: 1px solid var(--border); background: var(--card); }

.svc { padding: 14px 16px 10px; border-top: 1px solid var(--border); }
.svc:first-child { border-top: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 10px; }
.nm { display: flex; align-items: center; gap: .625rem; min-width: 0; font-size: 14px; font-weight: 500; }
.rt { display: flex; align-items: center; gap: .75rem; flex: none; }
.pc { font-size: 13px; color: var(--n400); font-variant-numeric: tabular-nums; }
.wd { font-size: 13px; color: var(--muted-foreground); }
.w-degraded { color: var(--deg); }
.w-outage   { color: var(--neg); }

/* ── the 90-day strip ─────────────────────────────────────────────────────
 * A grid so every day is exactly the same width at any viewport. The strip is a
 * FIXED 30px box with the days standing on its floor at 18px: a pointed day grows
 * upward into that headroom, so nothing below it ever moves. */
.bars {
  /* 🔴 THE ANCHOR FOR THE LABEL, AND IT IS LOAD-BEARING. The label is absolutely
   * positioned inside a day; its containing block is the nearest POSITIONED
   * ancestor, which must be this row, not the viewport. */
  position: relative;
  --gap: 2px;
  --row: 30px;
  height: var(--row);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  /* 🔴 NO column-gap. A gap belongs to no day, so the pointer crossing one
   * left every day, the row's grow collapsed and the label vanished (owner,
   * 08-11-2026: "we arent able to hover between the pills"). Each day owns half
   * of the gap on either side instead, and the row reaches half a gap past each
   * end, so every pill sits exactly where it did with column-gap. */
  margin-inline: calc(var(--gap) / -2);
}
/* A day is its whole cell: the full row, and half the gap either side, so the
 * pointer moving along the row, between pills or over their tops, is always on
 * a day. The pill a reader sees is the cell's CONTENT BOX: the padding above it
 * is the headroom a pointed day grows into, the padding either side is half the
 * gap, and the colour is a background-color clipped to that box.
 * 🔴 A BOX, NOT A GRADIENT IMAGE. A linear-gradient sized to the pill rounds
 * differently from a box and closed some of the 1px gaps on a phone (measured
 * at 390px wide, 3x). Painted as a box, the pills match the old ones pixel for
 * pixel. The pill is the day's own background and not a child, because the day
 * must stay static: the label is positioned against .bars (see the
 * containing-block guard in cmd/server/main_test.go). */
.b {
  display: block;
  --h: 18px;
  --c: var(--day-none);
  padding: calc(var(--row) - var(--h)) calc(var(--gap) / 2) 0;
  background: var(--c) content-box;
  transition: padding-top .16s var(--ease), background-color .16s ease;
}
.blk-ok       { --c: var(--day-ok); }
.blk-degraded { --c: var(--deg); }
.blk-outage   { --c: var(--neg); }
.blk-none     { --c: var(--day-none); }
.axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; color: var(--n500); font-variant-numeric: tabular-nums; }

/* ── pointing at a day: the Dock, and the label under the day ─────────────
 * Owner pick, 07-11-2026: no card, no orange, no crosshair. The day under the
 * pointer grows the most, the three days either side grow less and less, the rest
 * of the row dims, and a label with the date and figure rides under the day, in
 * the axis line, which hides while you point.
 *
 * The label is hidden on EVERY device by this rule, outside the hover query:
 * measured in the mock, a `display: none` that lived only inside the query left
 * all 1,710 labels showing at once on a phone. */
.ro { display: none; }

@media (hover: hover) and (pointer: fine) {
  /* 🔴 GATED ON A REAL POINTER. `:hover` on a touchscreen fires on tap and then
   * stays stuck, so an ungated rule would leave a label pinned on every phone. */

  .b { cursor: default; }
  /* For a browser without :has(): the pointed day still grows. */
  .b:hover { --h: 30px; }

  /* 🔴 THE ROW DIMS BY COLOUR, NEVER BY OPACITY. Opacity under 1 makes a day
   * its own stacking context, and a stacking context wins the hit test on the
   * sliver of edge it shares with the day beside it: a pointer resting there
   * moved to the dimmed day, which then stopped being dimmed, and back, every
   * frame (measured 08-11-2026: 10 of 10 edges; 0 with no opacity change). The
   * pill is mixed with the card instead, which is what opacity over the card
   * draws, and changes nothing the pointer hits. --o is the mix. */
  .bars:has(.b:hover) .b { --o: 40%; }
  .bars:has(.b:hover) .b:hover { --h: 30px; --o: 100%; }
  .bars:has(.b:hover) .b:hover + .b,
  .bars:has(.b:hover) .b:has(+ .b:hover) { --h: 26px; --o: 85%; }
  .bars:has(.b:hover) .b:hover + .b + .b,
  .bars:has(.b:hover) .b:has(+ .b + .b:hover) { --h: 23px; --o: 70%; }
  .bars:has(.b:hover) .b:hover + .b + .b + .b,
  .bars:has(.b:hover) .b:has(+ .b + .b + .b:hover) { --h: 20px; --o: 55%; }
  .bars:has(.b:hover) .blk-ok:hover { --c: var(--pos); }
  /* A browser without color-mix() keeps every pill at full colour: an
   * unsupported mix would leave the pills with no colour at all. */
  @supports (background-color: color-mix(in srgb, red 50%, blue)) {
    .bars:has(.b:hover) .b { background-color: color-mix(in srgb, var(--c) var(--o), var(--card)); }
  }

  .b:hover > .ro {
    display: flex;
    position: absolute;
    top: calc(100% + 4px);
    /* The day's centre: each day is one ninetieth of the row, its pill centred in it. */
    --bw: calc(100% / 90);
    --cx: calc(var(--i) * var(--bw) + var(--bw) / 2);
    left: var(--cx);
    transform: translateX(-50%);
    align-items: center;
    gap: 6px;
    padding: 0 4px;
    background: var(--card);   /* covers the axis text where :has() cannot hide it */
    /* 🔴 THE LABEL MUST NOT BE HIT-TESTABLE, or it steals the pointer from the
     * row it describes and flickers as you move. */
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
    font-size: 12px;
    line-height: 16px;
    color: var(--n300);
    font-variant-numeric: tabular-nums;
  }
  .b:hover > .ro.al { left: calc(var(--gap) / 2); transform: none; }
  .b:hover > .ro.ar { left: auto; right: calc(var(--gap) / 2); transform: none; }
  .ro b { color: var(--foreground); font-weight: 600; }
  .svc:has(.b:hover) .axis { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .b { transition: none; } }

.k { width: 6px; height: 6px; border-radius: 9999px; flex: none; background: var(--n600); }
.k.blk-ok { background: var(--pos); }
.k.blk-degraded { background: var(--deg); }
.k.blk-outage { background: var(--neg); }

/* The day index, one rule each: CSS cannot ask an element its place in a grid,
 * so the server writes `d37` and this turns it into a number. */
.d0{--i:0}
.d1{--i:1}
.d2{--i:2}
.d3{--i:3}
.d4{--i:4}
.d5{--i:5}
.d6{--i:6}
.d7{--i:7}
.d8{--i:8}
.d9{--i:9}
.d10{--i:10}
.d11{--i:11}
.d12{--i:12}
.d13{--i:13}
.d14{--i:14}
.d15{--i:15}
.d16{--i:16}
.d17{--i:17}
.d18{--i:18}
.d19{--i:19}
.d20{--i:20}
.d21{--i:21}
.d22{--i:22}
.d23{--i:23}
.d24{--i:24}
.d25{--i:25}
.d26{--i:26}
.d27{--i:27}
.d28{--i:28}
.d29{--i:29}
.d30{--i:30}
.d31{--i:31}
.d32{--i:32}
.d33{--i:33}
.d34{--i:34}
.d35{--i:35}
.d36{--i:36}
.d37{--i:37}
.d38{--i:38}
.d39{--i:39}
.d40{--i:40}
.d41{--i:41}
.d42{--i:42}
.d43{--i:43}
.d44{--i:44}
.d45{--i:45}
.d46{--i:46}
.d47{--i:47}
.d48{--i:48}
.d49{--i:49}
.d50{--i:50}
.d51{--i:51}
.d52{--i:52}
.d53{--i:53}
.d54{--i:54}
.d55{--i:55}
.d56{--i:56}
.d57{--i:57}
.d58{--i:58}
.d59{--i:59}
.d60{--i:60}
.d61{--i:61}
.d62{--i:62}
.d63{--i:63}
.d64{--i:64}
.d65{--i:65}
.d66{--i:66}
.d67{--i:67}
.d68{--i:68}
.d69{--i:69}
.d70{--i:70}
.d71{--i:71}
.d72{--i:72}
.d73{--i:73}
.d74{--i:74}
.d75{--i:75}
.d76{--i:76}
.d77{--i:77}
.d78{--i:78}
.d79{--i:79}
.d80{--i:80}
.d81{--i:81}
.d82{--i:82}
.d83{--i:83}
.d84{--i:84}
.d85{--i:85}
.d86{--i:86}
.d87{--i:87}
.d88{--i:88}
.d89{--i:89}

/* ── past incidents: months in a panel (option H1d) ──────────────────────── */
.hist .hx-month { display: flex; justify-content: space-between; padding: 10px 16px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .025); border-top: 1px solid var(--border); }
.hist .hx-month:first-child { border-top: 0; }
.hx-count { font-weight: 400; color: var(--muted-foreground); }
.hx-row { padding: 18px 16px 20px; border-top: 1px solid var(--border); }
.hx-d { margin: 0; display: flex; justify-content: space-between; gap: 1rem; font-size: 13px; color: var(--n500); font-variant-numeric: tabular-nums; }
.hx-res { display: inline-flex; align-items: center; gap: .5rem; color: var(--n400); }
.hx-row h3 { margin: 8px 0 0; display: flex; align-items: center; gap: .625rem; font-size: 19px; line-height: 26px; font-weight: 600; letter-spacing: -0.015em; }
.hx-marks { display: inline-flex; gap: 4px; flex: none; }
.hx-marks img { width: 22px; height: 22px; object-fit: contain; display: block; }
.hx-s { margin: 8px 0 0; font-size: 15px; line-height: 24px; color: var(--n300); max-width: 46rem; }
.hx-chips { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; font-size: 12px; line-height: 18px; color: var(--n300); border: 1px solid var(--line-strong); background: var(--card); white-space: nowrap; }
.hx-chip.dur { color: var(--foreground); font-weight: 500; font-variant-numeric: tabular-nums; }
.hx-chip.dur .dot { width: 6px; height: 6px; }
.hx-chip.auto { color: var(--n400); border-style: dashed; }

.hx-none { margin: 0; padding: 18px 16px; font-size: 14px; color: var(--muted-foreground); }

.foot { margin: 2rem 0 0; font-size: 12px; color: var(--muted-foreground); }

/* ── footer ──────────────────────────────────────────────────────────────── */
.ftr { border-top: 1px solid var(--border); margin-top: 4rem; }
.ftr-in { height: 4rem; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted-foreground); }
.ftr-links a { margin-left: 1.25rem; text-decoration: none; }
.ftr-links a:hover { color: var(--foreground); }

/* ── phones ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .wrap { padding: 0 1rem; }
  .nav { gap: 1rem; }
  .nav a:not(.btn) { display: none; }
  .sum { margin: 2.25rem 0 2rem; }
  .sum h1 { font-size: 1.625rem; line-height: 2rem; gap: .625rem; }
  .bars { --gap: 1px; }
  .tlm li { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .tlm-s { display: none; }
  .hx-row h3 { font-size: 17px; line-height: 24px; }
}
