/* Promptev Status. No external fonts or scripts: system fonts, one stylesheet. */

:root {
  color-scheme: light dark;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e4e9;
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --accent: #0369a1;
  --accent-2: #7c3aed;
  --ok: #15803d;
  --ok-soft: #86c99a;
  --minor: #a16207;
  --major: #c2570c;
  --down: #c81e1e;
  --none: #d6d9e0;
  --banner-ok: #15803d;
  --banner-text: #ffffff;
  --focus: #2563eb;
  --shadow: 0 1px 2px rgb(17 24 39 / 6%), 0 8px 24px rgb(17 24 39 / 6%);
  --radius: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #040408;
    --surface: #0d0d22;
    --surface-2: #11112a;
    --border: #1e1e48;
    --text: #f2f1f6;
    --text-2: #a8a8c8;
    --text-3: #8a8ab0;
    --accent: #00d8ff;
    --accent-2: #9b7cf8;
    --ok: #22c55e;
    --ok-soft: #3f8f5b;
    --minor: #eab308;
    --major: #f97316;
    --down: #ff4070;
    --none: #26264d;
    --banner-ok: #15803d;
    --focus: #00d8ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 35%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand .brand-icon,
.brand svg {
  flex: none;
}
.brand .muted {
  color: var(--text-3);
  font-weight: 500;
}
.header-actions {
  display: flex;
  gap: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  border-color: var(--accent);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

main {
  padding: 32px 0 48px;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 1.125rem;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}

/* Overall banner */
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--radius);
  color: var(--banner-text);
  background: var(--banner-ok);
  font-weight: 700;
  font-size: 1.125rem;
  box-shadow: var(--shadow);
}
.banner[data-status="degraded"] {
  background: #a16207;
}
.banner[data-status="partial_outage"] {
  background: #c2410c;
}
.banner[data-status="major_outage"] {
  background: #b91c1c;
}
.banner[data-status="loading"],
.banner[data-status="error"] {
  background: var(--surface-2);
  color: var(--text-2);
  box-shadow: none;
  border: 1px solid var(--border);
}
.banner .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.banner small {
  display: block;
  font-weight: 500;
  font-size: 0.8125rem;
  opacity: 0.9;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.components {
  margin-top: 24px;
  padding: 0;
  list-style: none;
}
.component {
  padding: 18px 20px;
  border-top: 1px solid var(--border);
}
.component:first-child {
  border-top: 0;
}
.component-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.component-name {
  font-weight: 650;
}
.component-desc {
  color: var(--text-3);
  font-size: 0.8125rem;
  margin: 2px 0 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.s-operational {
  color: var(--ok);
}
.s-degraded {
  color: var(--minor);
}
.s-down {
  color: var(--down);
}

/* Uptime bars */
.bars {
  position: relative;
  display: flex;
  gap: 2px;
  height: 34px;
  margin: 12px 0 6px;
  touch-action: manipulation;
}
.bars:focus-visible {
  outline-offset: 4px;
}
.bar {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 2px;
  background: var(--none);
  transition: opacity 0.15s;
}
.bar[data-b="ok"] {
  background: var(--ok);
}
.bar[data-b="minor"] {
  background: var(--minor);
}
.bar[data-b="major"] {
  background: var(--major);
}
.bar[data-b="down"] {
  background: var(--down);
}
.bars:hover .bar,
.bars.active .bar {
  opacity: 0.55;
}
.bars .bar.on {
  opacity: 1;
  outline: 2px solid var(--text);
  outline-offset: 1px;
}
.bar-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 0.75rem;
}
.bar-legend .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.bar-legend strong {
  color: var(--text-2);
  font-weight: 600;
}

/* Colour key under the components, like status.claude.com. The same tokens as the
   bars and the status pills; every colour also has its text label. */
.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 18px;
  margin: 12px 0 0;
  padding: 0 4px;
  list-style: none;
  color: var(--text-2);
  font-size: 0.8125rem;
}
.legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.legend .swatch {
  flex: none;
  width: 8px;
  height: 16px;
  border-radius: 2px;
  background: var(--none);
}
.legend .swatch[data-b="ok"] {
  background: var(--ok);
}
.legend .swatch[data-b="minor"] {
  background: var(--minor);
}
.legend .swatch[data-b="major"] {
  background: var(--major);
}
.legend .swatch[data-b="down"] {
  background: var(--down);
}
@media (max-width: 600px) {
  .legend {
    justify-content: flex-start;
    gap: 6px 14px;
    padding: 0;
  }
}

.tip {
  position: fixed;
  z-index: 20;
  max-width: min(300px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.8125rem;
  pointer-events: none;
}
.tip[hidden] {
  display: none;
}
.tip .tip-date {
  font-weight: 700;
}
.tip ul {
  margin: 6px 0 0;
  padding-left: 16px;
}
.tip .tip-none {
  color: var(--text-3);
  margin-top: 4px;
}

/* Incidents */
.incident {
  padding: 18px 20px;
  margin-bottom: 12px;
}
.inc-title {
  margin: 0;
  font-size: 1rem;
}
.inc-title a {
  color: inherit;
  text-decoration: none;
}
.inc-title a:hover {
  text-decoration: underline;
}
.incident.impact-minor .inc-title {
  color: var(--minor);
}
.incident.impact-major .inc-title,
.incident.impact-critical .inc-title {
  color: var(--down);
}
.incident.resolved .inc-title {
  color: var(--text);
}
.incident .meta {
  color: var(--text-3);
  font-size: 0.8125rem;
  margin: 4px 0 0;
}
.timeline {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 12px 18px;
  border-left: 2px solid var(--border);
  margin-left: 4px;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--text-3);
}
.timeline .u-status {
  font-weight: 700;
  text-transform: capitalize;
}
.timeline .u-time {
  display: block;
  color: var(--text-3);
  font-size: 0.75rem;
}
.timeline p {
  margin: 0;
  overflow-wrap: anywhere;
}
.empty {
  color: var(--text-3);
  padding: 16px 20px;
}
.day-group h3.day {
  font-size: 0.9375rem;
  margin: 24px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.8125rem;
}
footer.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 32px;
}
footer.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
footer.site-footer a {
  color: var(--text-2);
}

/* Admin */
.form {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.form label,
.form legend {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 4px;
}
.form input[type="text"],
.form select,
.form textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.form textarea {
  min-height: 96px;
  resize: vertical;
}
.form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.checks label {
  font-weight: 500;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}
.row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 480px) {
  .row {
    grid-template-columns: 1fr;
  }
}
.notice {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.875rem;
}
.notice.err {
  border-color: var(--down);
  color: var(--down);
}
.notice.dev {
  border-color: var(--minor);
}
details.update-form summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  margin-top: 12px;
}
details.update-form .form {
  padding: 12px 0 0;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
  .brand .muted {
    display: none;
  }
  .btn {
    padding: 8px 12px;
  }
  .component,
  .incident {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

h1.inc-title {
  font-size: 1.5rem;
  line-height: 1.25;
}

/* The narrowest phones: History stays in the footer, Subscribe stays up top. */
@media (max-width: 360px) {
  .header-actions .btn:not(.primary) {
    display: none;
  }
}
/* Admin panel only: who posted an update. The public timeline never carries a name. */
.timeline .u-by {
  color: var(--text-3);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Subscribe to updates: a popover under the header button, like status.claude.com.
   A row of equal square icon tabs, then one form. */
:root {
  --tab-bg: #eef0f3;
  --tab-fg: #374151;
  --tab-on-bg: #3f3f46;
  --tab-on-fg: #ffffff;
  --submit-bg: #111111;
  --submit-fg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --tab-bg: #15152e;
    --tab-fg: #a8a8c8;
    --tab-on-bg: #e4e4ee;
    --tab-on-fg: #0d0d22;
    --submit-bg: #f2f1f6;
    --submit-fg: #040408;
  }
}
@media (max-width: 480px) {
  .btn .long {
    display: none;
  }
}
.sub-pop {
  position: absolute;
  inset: auto;
  z-index: 30;
  width: 380px;
  max-width: calc(100vw - 16px);
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 12px 40px rgb(17 24 39 / 18%), 0 2px 6px rgb(17 24 39 / 8%);
  overflow: hidden;
}
@media (max-width: 480px) {
  .sub-pop {
    width: auto;
    max-width: none;
  }
}
.sub-tabrow {
  display: grid;
  grid-template-columns: 5fr 1fr;
  border-bottom: 1px solid var(--border);
}
.sub-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.sub-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  max-height: 60px;
  width: 100%;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: var(--tab-bg);
  color: var(--tab-fg);
  cursor: pointer;
}
.sub-close {
  border-right: 0;
}
.sub-tab svg {
  width: 22px;
  height: 22px;
}
.sub-tab:hover {
  color: var(--text);
}
.sub-tab[aria-selected="true"] {
  background: var(--tab-on-bg);
  color: var(--tab-on-fg);
}
.sub-tab:focus-visible {
  outline-offset: -3px;
  border-radius: 0;
}
.sub-body {
  padding: 18px 20px 16px;
}
.sub-lead {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.sub-lead b {
  font-weight: 700;
}
.sub-form {
  display: grid;
  gap: 8px;
}
.sub-form label {
  font-weight: 700;
  font-size: 0.875rem;
}
.sub-form p {
  margin: 0;
}
.sub-form input,
.sub-copy-row input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
}
.sub-copy-row {
  display: flex;
  gap: 6px;
}
.sub-copy-row input {
  flex: 1 1 auto;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-2);
}
.sub-copy-btn {
  flex: none;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.sub-hint {
  color: var(--text-3);
  font-size: 0.8125rem;
}
.sub-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 0;
  border-radius: 6px;
  background: var(--submit-bg);
  color: var(--submit-fg);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.sub-submit:hover {
  opacity: 0.88;
}
.sub-form input:disabled,
.sub-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sub-unavailable {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.875rem;
}
.sub-unavailable[hidden],
.sub-status[hidden],
.sub-turnstile[hidden],
.sub-turnstile:empty {
  display: none;
}
.sub-turnstile {
  margin-top: 10px;
}
.sub-status {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.sub-status.ok {
  border-color: var(--ok);
}
.sub-status.err {
  border-color: var(--down);
  color: var(--down);
}
.sub-foot {
  margin: 14px 0 0;
  color: var(--text-3);
  font-size: 0.75rem;
  line-height: 1.5;
}
.sub-foot a {
  color: var(--text-2);
}

/* Confirm and unsubscribe pages. */
.wrap.narrow {
  max-width: 560px;
}
.manage {
  padding: 24px;
}
.manage h1 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}
.manage p {
  color: var(--text-2);
}
.manage-result:empty {
  display: none;
}
.manage-result {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.manage-result.ok {
  border-color: var(--ok);
  color: var(--text);
}
.manage-result.err {
  border-color: var(--down);
  color: var(--down);
}
.manage .btn[hidden] {
  display: none;
}
