/* The status page. Everything structural comes from style.v2.css and chrome.css;
   these are the pieces only this page has. Colours are PALETTE leaf,
   cookie and rose from src/web/theme.js. */

.st-banner { display: flex; align-items: center; gap: 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 0 0 26px; }
.st-banner strong { font-size: 1.22rem; letter-spacing: -.01em; }
.st-banner.ok { border-color: rgba(159, 210, 122, .35); }
.st-banner.warn { border-color: rgba(229, 168, 95, .4); }
.st-banner.bad { border-color: rgba(239, 106, 111, .4); }
.st-checked { margin-left: auto; color: var(--faint); font-size: .84rem; }

.st-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; background: var(--muted); }
.st-dot.ok { background: #9fd27a; animation: st-pulse 2.4s ease-in-out infinite; }
.st-dot.warn { animation: st-pulse-warn 1.6s ease-in-out infinite; }
.st-dot.bad { animation: st-pulse-bad 1.1s ease-in-out infinite; }

/* A ring that grows and fades, rather than the dot itself changing size:
   a dot that resizes nudges the text beside it on every beat. */
@keyframes st-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(159, 210, 122, .45); }
  70% { box-shadow: 0 0 0 7px rgba(159, 210, 122, 0); }
}
@keyframes st-pulse-warn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 168, 95, .5); }
  70% { box-shadow: 0 0 0 7px rgba(229, 168, 95, 0); }
}
@keyframes st-pulse-bad {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 106, 111, .55); }
  70% { box-shadow: 0 0 0 7px rgba(239, 106, 111, 0); }
}

/* Anybody who has asked their system not to animate things gets a plain
   dot. A status page is not the place to argue with that setting. */
@media (prefers-reduced-motion: reduce) {
  .st-dot.ok, .st-dot.warn, .st-dot.bad { animation: none; }
  .st-dot.ok { box-shadow: 0 0 0 4px rgba(159, 210, 122, .14); }
}
.st-dot.warn { background: #e5a85f; }
.st-dot.bad { background: #ef6a6f; }
.st-dot.idle { background: var(--faint); }

.st-h { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); margin: 30px 0 12px; }

.st-list { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.st-row { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--line); }
.st-row:first-child { border-top: 0; }
.st-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st-left strong { display: block; font-size: .98rem; }
.st-blurb { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.st-right { margin-left: auto; text-align: right; flex: none; }
.st-word { display: block; font-size: .9rem; font-weight: 600; }
.st-word.ok { color: #9fd27a; }
.st-word.warn { color: #e5a85f; }
.st-word.bad { color: #ef6a6f; }
.st-word.idle { color: var(--muted); }
.st-detail { color: var(--faint); font-size: .8rem; }

/* Phones. The blurb and the checked-at line go first: a component row has
   to fit its name and its state on one line without wrapping, and
   everything else on it is detail. */
@media (max-width: 620px) {
  .st-blurb { display: none; }
  .st-checked { display: none; }

  .st-banner { padding: 15px 16px; gap: 10px; }
  .st-banner strong { font-size: 1.05rem; }

  .st-row { padding: 13px 15px; gap: 10px; }
  .st-left strong { font-size: .93rem; }
  .st-word { font-size: .83rem; }
  .st-detail { font-size: .75rem; }

  .st-card { padding: 15px 16px; }
  .st-card h3 { font-size: .99rem; }
  .st-card p { font-size: .9rem; }
  .st-tag { font-size: .62rem; padding: 2px 7px; }

  .st-sub { padding: 18px 16px; }
}

/* Nothing here may push the page sideways. One row that overflows turns the
   whole page into a horizontal scroll, which is the most irritating way a
   page can break on a phone. */
#status-app, .st-row, .st-card, .st-banner { max-width: 100%; }
.st-left { min-width: 0; }
.st-left strong, .st-card h3 { overflow-wrap: anywhere; }

.st-card { background: var(--panel); border: 1px solid var(--line); border-left-width: 3px;
  border-radius: 12px; padding: 18px 20px; margin: 0 0 12px; }
.st-card.maintenance { border-left-color: #5865f2; }
.st-card.incident { border-left-color: #ef6a6f; }
.st-card.done { border-left-color: var(--line-hi); opacity: .72; }
.st-card h3 { margin: 10px 0 6px; font-size: 1.04rem; }
.st-card p { color: var(--muted); font-size: .94rem; margin: 0; }
.st-card-head { display: flex; flex-wrap: wrap; gap: 6px; }
.st-when { color: var(--faint); font-size: .84rem; margin-top: 10px !important; }

.st-tag { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; background: var(--panel-hi); color: var(--muted);
  border: 1px solid var(--line-hi); }
.st-tag.maintenance { background: rgba(88, 101, 242, .16); color: #aab4ff; border-color: transparent; }
.st-tag.incident { background: rgba(239, 106, 111, .16); color: #ff9a9c; border-color: transparent; }
.st-tag.state.resolved { background: rgba(159, 210, 122, .14); color: #8ff0b0; border-color: transparent; }

.st-none { color: var(--muted); background: var(--panel); border: 1px dashed var(--line-hi);
  border-radius: 12px; padding: 20px; margin: 0; }

.st-sub { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; margin: 30px 0 0; }
.st-sub h2 { margin: 0 0 6px; font-size: 1.05rem; }
.st-sub > p { color: var(--muted); font-size: .92rem; margin: 0 0 16px; }
.st-sub input[type=email] { width: 100%; box-sizing: border-box; background: var(--panel-hi);
  border: 1px solid var(--line-hi); border-radius: 10px; padding: 11px 14px;
  color: var(--text); font: inherit; font-size: .95rem; }
.st-opts { display: grid; gap: 8px; margin: 14px 0 16px; }
.st-opts label { display: flex; gap: 10px; align-items: flex-start; color: var(--muted);
  font-size: .92rem; cursor: pointer; }
.st-opts input { margin-top: 3px; flex: none; }
.st-sub-msg { color: var(--faint); font-size: .88rem; margin: 10px 0 0; min-height: 1.2em; }

/* One brand: the page glows cookie gold like every other page, not sky
   blue, and its key word is gold with the hand-drawn underline. */
body::before {
  background:
    radial-gradient(560px 300px at 26% 62%, rgba(236, 130, 50, .16), transparent 70%),
    radial-gradient(620px 320px at 74% 42%, rgba(255, 196, 120, .24), transparent 72%),
    radial-gradient(900px 260px at 50% 30%, rgba(255, 226, 180, .08), transparent 70%);
}
.hl { position: relative; display: inline-block; white-space: nowrap; padding-bottom: .04em;
  background: linear-gradient(100deg, #ffe2b4 0%, #f0c483 40%, #e5a85f 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #f0c483;
  filter: drop-shadow(0 6px 26px rgba(240, 196, 131, .28)); }
.hl .x-ul { position: absolute; left: -2%; width: 104%; bottom: -.14em; height: .26em; overflow: visible; pointer-events: none; }
.hl .x-ul path { fill: none; stroke: url(#hl-g); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .hl .x-ul path { animation: st-draw .8s cubic-bezier(.65, 0, .35, 1) .3s both; }
}
@keyframes st-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.doc-head .stamp { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 650;
  letter-spacing: .02em; text-transform: none; color: #f6d9ad; background: rgba(240, 196, 131, .1); border: 1px solid rgba(240, 196, 131, .3); }
.doc-head .stamp::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9fd27a; box-shadow: 0 0 0 3px rgba(159, 210, 122, .2); }
input[type=checkbox], input[type=radio] { accent-color: #f0c483; }

/* ---- The title, lit like every other page ----
   The same warm sky the website's inner pages have (site.css, "every other
   page's title"): a gold glow, a faint grid fading out, a lit line under the
   title, and the title in white turning to cream. It is copied here, not
   shared, because this page is built on style.v2.css, not site.css. */
.doc-head { position: relative; isolation: isolate; padding: 88px 0 40px; margin: 0 0 30px; }
.doc-head::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -220px; bottom: 0;
  width: calc(100vw - var(--sb-sbw, 0px)); margin-left: calc(var(--sb-sbw, 0px) / 2 - 50vw); pointer-events: none;
  background:
    radial-gradient(40% 62% at 26% 40%, rgba(255, 196, 120, .26), transparent 70%),
    radial-gradient(34% 55% at 74% 26%, rgba(236, 130, 50, .18), transparent 70%),
    radial-gradient(60% 40% at 50% 0%, rgba(255, 226, 180, .10), transparent 70%),
    linear-gradient(rgba(255, 228, 190, .06) 1px, transparent 1px) center top / 64px 64px,
    linear-gradient(90deg, rgba(255, 228, 190, .06) 1px, transparent 1px) center top / 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 85% at 50% 20%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 85% at 50% 20%, #000 30%, transparent 78%);
}
.doc-head::after {
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: 0; width: min(1120px, 100%); height: 90px;
  transform: translateX(-50%); pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 220, 170, .55) 50%, transparent) bottom / 100% 1px no-repeat,
    radial-gradient(45% 100% at 50% 100%, rgba(240, 196, 131, .14), transparent 75%);
}
.doc-head h1 {
  font-size: clamp(36px, 5.4vw, 56px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 700;
  margin: 18px 0 18px; max-width: 20ch;
  background: linear-gradient(180deg, #fff 35%, #f1dbb8); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #fff;
}
.doc-head h1 .hl { -webkit-text-fill-color: transparent; }
.doc-head .lede { max-width: 620px; color: #b4b9c5; font-size: 17.5px; line-height: 1.6; }
/* The waveform, drawn the same weight as on the website. */
.doc-head .hl .x-ul path { stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
@media (prefers-reduced-motion: no-preference) {
  .doc-head > * { animation: st-rise .55s cubic-bezier(.2, .7, .2, 1) both; }
  .doc-head > :nth-child(2) { animation-delay: 60ms; }
  .doc-head > :nth-child(n+3) { animation-delay: 120ms; }
  .doc-head::before { animation: st-fade .9s ease both; }
}
@keyframes st-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 720px) {
  .doc-head { padding: 40px 0 30px; }
  .doc-head .lede { font-size: 16.5px; }
}

/* ---- Glass panels ----
   The cards sit on the same dark glass as the rest of Sample, edged in a
   thread of gold. The state colours (green, amber, red) still win on the
   banner, because that is the one thing people come here to read. */
.st-banner, .st-list, .st-sub, .st-card, .st-none {
  background: linear-gradient(180deg, rgba(24, 26, 32, .78), rgba(12, 13, 17, .88));
  border-color: rgba(240, 196, 131, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 60px -36px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.st-banner { border-radius: 16px; }
.st-banner.ok { border-color: rgba(159, 210, 122, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 60px -28px rgba(159, 210, 122, .45); }
.st-banner.warn { border-color: rgba(229, 168, 95, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 60px -28px rgba(229, 168, 95, .5); }
.st-banner.bad { border-color: rgba(239, 106, 111, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 60px -28px rgba(239, 106, 111, .5); }
.st-list { border-radius: 16px; }
.st-row { border-top-color: rgba(255, 255, 255, .06); }
.st-card.maintenance { border-left-color: #5865f2; }
.st-card.incident { border-left-color: #ef6a6f; }
.st-card.done { border-left-color: var(--line-hi); }
.st-sub { border-radius: 16px; }
.st-sub h2 { background: linear-gradient(100deg, #ffe2b3, #f0c483 45%, #e5a85f); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #f0c483; display: inline-block; }
.st-sub input[type=email] { background: rgba(0, 0, 0, .35); }
.st-sub input[type=email]:focus { outline: none; border-color: rgba(240, 196, 131, .6); box-shadow: 0 0 0 3px rgba(240, 196, 131, .16); }
.st-h { color: #c9b48f; }

/* A soft gold light behind the list, so the page keeps glowing below the title. */
#status-app { position: relative; isolation: isolate; }
#status-app::before {
  content: ""; position: absolute; z-index: -1; left: -10%; right: -10%; top: 40px; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(240, 180, 100, .10), rgba(229, 140, 60, .04) 55%, transparent);
}
@media (max-width: 620px) { #status-app::before { left: 0; right: 0; } }
