/* Procteye status page, in the landing site's language (procteye-landing
   DESIGN.md): the Authority tokens, Plus Jakarta Sans headings and Inter
   body text. Light by default; Dark and System from the footer control. */

@font-face { font-family: "Inter"; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --canvas: #f7f9fb;
  --surface: #ffffff;
  --sunken: #eceef0;
  --text: #191c1e;
  --muted: #45464d;
  --line: #e2e8f0;
  --accent: #0051d5;
  --accent-text: #0051d5;
  --accent-subtle: #eef3ff;
  --accent-hover: #003ea8;
  --on-accent: #ffffff;
  --line-soft: rgb(226 232 240 / 0.5);
  --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 20px rgb(0 81 213 / 0.15);
  --secondary-bg: #ffffff;
  --secondary-hover: #eceef0;
  --ok: #047857;
  --ok-bg: #d1fae5;
  --ok-bar: #10b981;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --warn-bar: #f59e0b;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --bad-bar: #ef4444;
  --idle: #45464d;
  --idle-bg: #eceef0;
  --idle-bar: #dfe3e8;
  --tip-bg: #191c1e;
  --tip-text: #f8fafc;
  color-scheme: light;
}

/* Dark follows the OS unless the theme control says Light, and always
   applies when it says Dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #020617;
    --surface: #0b1120;
    --sunken: #0f172a;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --line: #334155;
    --accent: #7aa2ff;
    --accent-text: #7aa2ff;
    --accent-subtle: #0b1a3d;
    --accent-hover: #a5c0ff;
    --on-accent: #0f172a;
    --line-soft: rgb(51 65 85 / 0.5);
    --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
    --shadow-glow: 0 0 20px rgb(122 162 255 / 0.2);
    --secondary-bg: #0b1120;
    --secondary-hover: #1e293b;
    --ok: #6ee7b7;
    --ok-bg: #064e3b;
    --ok-bar: #10b981;
    --warn: #fde68a;
    --warn-bg: #78350f;
    --warn-bar: #f59e0b;
    --bad: #fca5a5;
    --bad-bg: #7f1d1d;
    --bad-bar: #ef4444;
    --idle: #cbd5e1;
    --idle-bg: #1e293b;
    --idle-bar: #1e293b;
    --tip-bg: #f8fafc;
    --tip-text: #0f172a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --canvas: #020617;
  --surface: #0b1120;
  --sunken: #0f172a;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --line: #334155;
  --accent: #7aa2ff;
  --accent-text: #7aa2ff;
  --accent-subtle: #0b1a3d;
  --accent-hover: #a5c0ff;
  --on-accent: #0f172a;
  --line-soft: rgb(51 65 85 / 0.5);
  --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
  --shadow-glow: 0 0 20px rgb(122 162 255 / 0.2);
  --secondary-bg: #0b1120;
  --secondary-hover: #1e293b;
  --ok: #6ee7b7;
  --ok-bg: #064e3b;
  --ok-bar: #10b981;
  --warn: #fde68a;
  --warn-bg: #78350f;
  --warn-bar: #f59e0b;
  --bad: #fca5a5;
  --bad-bg: #7f1d1d;
  --bad-bar: #ef4444;
  --idle: #cbd5e1;
  --idle-bg: #1e293b;
  --idle-bar: #1e293b;
  --tip-bg: #f8fafc;
  --tip-text: #0f172a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-text); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 80rem; margin: 0 auto; padding-inline: 1.5rem; }

/* ---------- Top bar: the landing navbar (PublicNavbar) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--canvas);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.topbar[data-scrolled="true"] { border-bottom-color: var(--line); box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: auto; height: 28px; }
.nav-links { display: flex; gap: 2rem; font-size: 0.875rem; font-weight: 500; }
.nav-links a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }

/* ---------- Buttons: the landing .btn-primary / .btn-secondary ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn-secondary { background: var(--secondary-bg); border-color: var(--line); color: var(--muted); }
.btn-secondary:hover { background: var(--secondary-hover); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-sm { min-height: 40px; border-radius: 8px; }

/* ---------- Hero: flat page surface, as on the landing pages ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
  padding-block: 4rem 5rem;
}
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; font-size: 0.875rem; color: var(--muted); }
/* The landing's pill eyebrow ("For job seekers"). */
.eyebrow-pill {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 600;
}
h1 {
  margin: 1.25rem 0 1.25rem;
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.lede { max-width: 34rem; color: var(--muted); font-size: 1.125rem; line-height: 1.75rem; }
.actions { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

/* The live panel, in the shape of the landing page's sign-in trace. */
.panel {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.panel-head small { display: block; color: var(--muted); font-size: 0.75rem; }
/* The landing .badge: 12px semibold on a tinted fill, 6px corners. */
.pill {
  flex: none;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  font-weight: 600;
  background: var(--idle-bg);
  color: var(--idle);
  font-size: 0.75rem;
  white-space: nowrap;
}
.pill[data-state="ok"] { background: var(--ok-bg); color: var(--ok); }
.pill[data-state="partial"] { background: var(--warn-bg); color: var(--warn); }
.pill[data-state="major"] { background: var(--bad-bg); color: var(--bad); }

.rows { list-style: none; margin: 0; padding: 0.6rem 0; }
.row {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
}
.row .name { line-height: 1.3; min-width: 0; }
.row .name small { display: block; color: var(--muted); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .state { color: var(--muted); text-align: right; }
.row[data-state="ok"] .state { color: var(--ok); }
.row[data-state="partial"] .state { color: var(--warn); }
.row[data-state="major"] .state { color: var(--bad); }

/* Status mark: tick, dash or cross on a tinted disc. */
.mark { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--idle-bg); display: grid; place-items: center; }
.mark::after { content: ""; width: 0.4rem; height: 1.5px; background: var(--idle); border-radius: 1px; }
.row[data-state="ok"] .mark { background: var(--ok-bg); }
.row[data-state="ok"] .mark::after {
  width: 0.38rem; height: 0.2rem; background: none; border-radius: 0;
  border-left: 1.5px solid var(--ok); border-bottom: 1.5px solid var(--ok);
  transform: translateY(-1px) rotate(-45deg);
}
.row[data-state="partial"] .mark { background: var(--warn-bg); }
.row[data-state="partial"] .mark::after { background: var(--warn); }
.row[data-state="major"] .mark { background: var(--bad-bg); }
.row[data-state="major"] .mark::after { background: var(--bad); width: 0.45rem; height: 0.45rem; border-radius: 50%; }

.panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.panel-foot[data-state="ok"] #foot-left { color: var(--ok); }
.panel-foot[data-state="partial"] #foot-left { color: var(--warn); }
.panel-foot[data-state="major"] #foot-left { color: var(--bad); }

/* ---------- Sections ---------- */
main { padding-block: 1rem 4rem; }
.block { padding-block: 3.5rem 0; }
.block-head { margin-bottom: 1.5rem; }
h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.sub { margin-top: 0.6rem; color: var(--muted); max-width: 40rem; }
#active h2 { margin-bottom: 1.25rem; }

.groups { display: grid; gap: 1rem; }
.group {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.group-name {
  padding: 0.95rem 1.25rem 0;
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.component { padding: 0.9rem 1.25rem 1.1rem; }
.component + .component { border-top: 1px solid var(--line); }
.component-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.component-name { font-weight: 600; letter-spacing: -0.01em; min-width: 0; }
.component-name small { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 400; letter-spacing: 0; overflow-wrap: anywhere; }

.bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 3px; height: 2.1rem; }
.bar { border-radius: 2px; background: var(--idle-bar); }
.bar[data-state="ok"] { background: var(--ok-bar); }
.bar[data-state="partial"] { background: var(--warn-bar); }
.bar[data-state="major"] { background: var(--bad-bar); }
.bar:hover { filter: brightness(1.15); }

.bars-foot {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.bars-foot .rule { height: 1px; background: var(--line); }
.bars-foot .pct { color: var(--text); }

.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1.1rem; color: var(--muted); font-size: 0.75rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.sw { width: 0.65rem; height: 0.65rem; border-radius: 2px; background: var(--idle-bar); }
.sw[data-state="ok"] { background: var(--ok-bar); }
.sw[data-state="partial"] { background: var(--warn-bar); }
.sw[data-state="major"] { background: var(--bad-bar); }

/* Incidents */
.incidents, .days { list-style: none; margin: 0; padding: 0; }
.incident {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--idle-bar);
  border-radius: 12px;
  background: var(--surface);
}
.incident + .incident { margin-top: 0.75rem; }
.incident[data-state="major"] { border-left-color: var(--bad-bar); }
.incident[data-state="partial"] { border-left-color: var(--warn-bar); }
.incident[data-state="resolved"] { border-left-color: var(--ok-bar); }
.incident-title { font-weight: 600; }
.incident-title a { color: inherit; text-decoration: none; }
.incident-title a:hover { color: var(--accent-text); }
.incident-meta { color: var(--muted); font-size: 0.85rem; }

.days { border-top: 1px solid var(--line); }
.day {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem 2rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.day-date { color: var(--muted); font-size: 0.85rem; padding-top: 0.1rem; }
.day-empty { color: var(--muted); }

/* Footer: the landing PublicFooter (brand column, link columns, rule, copyright). */
.foot { border-top: 1px solid var(--line); background: var(--canvas); padding-block: 3rem; }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.5rem; margin-bottom: 2rem; }
.foot-brand .brand { margin-bottom: 1rem; }
.foot-brand p { max-width: 20rem; color: var(--muted); font-size: 0.875rem; line-height: 1.25rem; }
.foot h3 { margin-bottom: 1rem; font-size: 1rem; font-weight: 700; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.875rem; }
.foot ul a { color: var(--muted); text-decoration: none; }
.foot ul a:hover { color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }

/* Tooltip */
.tip {
  position: fixed;
  z-index: 10;
  max-width: 17rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: var(--tip-bg);
  color: var(--tip-text);
  font-size: 0.75rem;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 10px 30px rgb(4 4 12 / 0.3);
}
.tip strong { display: block; font-weight: 600; }

.from-30 { display: none; }

/* The landing navbar folds its links away below 1024px; here they live on
   in the footer, and the Subscribe button stays. */
@media (max-width: 1023px) {
  .nav-links { display: none; }
}
@media (max-width: 767px) {
  .brand img { height: 24px; }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-block: 2rem 3.5rem; }
  .day { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
}

@media (max-width: 560px) {
  .foot-grid { gap: 2rem 0.75rem; }
  .actions .btn { flex: 1 1 100%; }
  .bars { grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; height: 1.9rem; }
  .bar:nth-child(-n + 60) { display: none; }
  .from-90 { display: none; }
  .from-30 { display: inline; }
  .legend { display: grid; grid-template-columns: repeat(2, max-content); gap: 0.5rem 1.5rem; }
  .block { padding-block: 2.75rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.fallback { margin-top: 1rem; color: var(--muted); font-size: 0.875rem; }

/* Dark surfaces take the reversed lockup, as on the landing site. */
:root[data-theme="dark"] .brand img { content: url("brand/lockup-reverse.svg"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .brand img { content: url("brand/lockup-reverse.svg"); }
}

/* Theme control (dashboard DESIGN.md §5.11). */
.theme-control { display: flex; align-items: center; gap: 0.75rem; margin: 0; padding: 0; border: 0; }
.theme-control legend { float: left; padding: 0; color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.theme-options { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--canvas); }
.theme-option { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; color: var(--muted); font-size: 0.875rem; cursor: pointer; }
.theme-option input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.theme-option svg { width: 14px; height: 14px; flex: none; }
.theme-label { display: inline-grid; }
.theme-label::after { content: attr(data-label); height: 0; font-weight: 600; visibility: hidden; user-select: none; }
.theme-option:has(input:checked) { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.theme-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 860px) { .theme-option { min-height: 44px; } }
