:root {
  --murphy-bg: #0d1117;
  --murphy-panel: #131920;
  --murphy-panel-raised: #161b22;
  --murphy-border: #30363d;
  --murphy-text: #e6edf3;
  --murphy-muted: #8b949e;
  --murphy-accent: #00d4aa;
  --murphy-accent-strong: #39d353;
  --murphy-warning: #e3b341;
  --murphy-danger: #f85149;
  --murphy-info: #58a6ff;
  --murphy-radius: 12px;
  --murphy-shadow: 0 18px 50px rgb(0 0 0 / 28%);
  --murphy-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --murphy-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--murphy-bg); }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 85% -10%, rgb(0 212 170 / 13%), transparent 34rem),
    var(--murphy-bg);
  color: var(--murphy-text);
  font-family: var(--murphy-sans);
  line-height: 1.5;
}

a { color: var(--murphy-accent); }
a:hover { color: var(--murphy-accent-strong); }

button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--murphy-info);
  outline-offset: 3px;
}

code, pre { font-family: var(--murphy-mono); }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  padding: .75rem 1rem;
  border-radius: 8px;
  background: var(--murphy-text);
  color: var(--murphy-bg);
}
.skip-link:focus { top: 1rem; }

.murphy-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(10rem, auto) 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: 4rem;
  padding: .65rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--murphy-border);
  background: rgb(13 17 23 / 92%);
  backdrop-filter: blur(18px);
}

.murphy-brand {
  display: inline-flex;
  gap: .65rem;
  align-items: center;
  width: max-content;
  color: var(--murphy-text);
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: none;
}

.murphy-eye { width: 2.3rem; height: 1.5rem; }
.murphy-eye svg { display: block; width: 100%; height: 100%; overflow: visible; }
.murphy-eye__outline { fill: rgb(0 212 170 / 8%); stroke: var(--murphy-accent); stroke-width: 2; }
.murphy-eye__iris { fill: rgb(88 166 255 / 28%); stroke: var(--murphy-info); stroke-width: 1.5; }
.murphy-eye__pupil { fill: var(--murphy-text); transform-origin: 32px 20px; transition: transform 80ms linear; }

.murphy-nav {
  display: flex;
  gap: .25rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
}
.murphy-nav a {
  flex: 0 0 auto;
  padding: .45rem .7rem;
  border-radius: 7px;
  color: var(--murphy-muted);
  text-decoration: none;
}
.murphy-nav a:hover, .murphy-nav a[aria-current="page"] {
  background: var(--murphy-panel-raised);
  color: var(--murphy-text);
}

.truth-badge {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  padding: .35rem .6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.truth-badge--completed, .truth-badge--executed, .truth-badge--healthy { color: var(--murphy-accent-strong); }
.truth-badge--partial, .truth-badge--degraded, .truth-badge--awaiting_approval { color: var(--murphy-warning); }
.truth-badge--blocked, .truth-badge--failed { color: var(--murphy-danger); }
.truth-badge--unavailable, .truth-badge--transport_error, .truth-badge--unknown { color: var(--murphy-muted); }

.status-region {
  min-height: 0;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}
.status-region:not(:empty) {
  padding-top: .8rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--murphy-border);
  background: rgb(88 166 255 / 8%);
}

.murphy-main {
  width: min(100%, 92rem);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 3rem);
}

.murphy-footer {
  display: flex;
  gap: .5rem;
  justify-content: center;
  padding: 1.5rem;
  color: var(--murphy-muted);
  font-size: .75rem;
}

.surface-frame { padding: clamp(1rem, 4vw, 4rem); }
.auth-shell { display: grid; min-height: calc(100vh - 12rem); place-items: center; }
.auth-shell__panel {
  width: min(100%, 34rem);
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid var(--murphy-border);
  border-radius: var(--murphy-radius);
  background: var(--murphy-panel);
  box-shadow: var(--murphy-shadow);
}

.eyebrow {
  margin: 0 0 .5rem;
  color: var(--murphy-accent);
  font-family: var(--murphy-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2 { line-height: 1.15; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.04em; }
h2 { margin: .2rem 0 .75rem; font-size: 1.15rem; }
.lede { max-width: 70ch; color: var(--murphy-muted); font-size: 1.05rem; }
.supporting-copy { color: var(--murphy-muted); font-size: .9rem; }

.primary-action, .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
}
.primary-action { border: 1px solid var(--murphy-accent); background: var(--murphy-accent); color: var(--murphy-bg); }
.secondary-action { border: 1px solid var(--murphy-border); background: var(--murphy-panel); color: var(--murphy-text); }

.app-shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; }
.app-sidebar {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  align-self: start;
  padding: 1rem;
  border: 1px solid var(--murphy-border);
  border-radius: var(--murphy-radius);
  background: var(--murphy-panel);
  color: var(--murphy-muted);
  overflow-wrap: anywhere;
}
.app-sidebar strong { color: var(--murphy-text); }
.app-content { min-width: 0; }
.page-heading { display: flex; gap: 1rem; align-items: end; justify-content: space-between; }

.truth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.truth-card {
  min-height: 15rem;
  padding: 1rem;
  border: 1px solid var(--murphy-border);
  border-radius: var(--murphy-radius);
  background: var(--murphy-panel);
}
.truth-card[data-state="completed"], .truth-card[data-state="executed"], .truth-card[data-state="healthy"] { border-color: var(--murphy-accent-strong); }
.truth-card[data-state="partial"], .truth-card[data-state="degraded"], .truth-card[data-state="awaiting_approval"] { border-color: var(--murphy-warning); }
.truth-card[data-state="blocked"], .truth-card[data-state="failed"] { border-color: var(--murphy-danger); }
.truth-card__state { font-weight: 750; }
.truth-card pre {
  max-height: 12rem;
  margin: 1rem 0 0;
  padding: .75rem;
  overflow: auto;
  border-radius: 8px;
  background: var(--murphy-bg);
  color: var(--murphy-muted);
  font-size: .72rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal-shell { border: 1px solid var(--murphy-border); border-radius: var(--murphy-radius); overflow: hidden; background: #050a08; }
.terminal-shell__bar { padding: .55rem .8rem; border-bottom: 1px solid var(--murphy-border); color: var(--murphy-accent); font-family: var(--murphy-mono); }
.terminal-shell__content { min-height: 30rem; padding: 1rem; font-family: var(--murphy-mono); }

@media (max-width: 900px) {
  .murphy-header { grid-template-columns: 1fr auto; }
  .murphy-nav { grid-column: 1 / -1; order: 3; padding-bottom: .2rem; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .truth-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .murphy-header { padding-inline: .8rem; }
  .murphy-brand__name { display: none; }
  .murphy-header__truth { justify-self: end; }
  .murphy-main { padding: 1rem; }
  .page-heading { align-items: start; flex-direction: column; }
  .secondary-action { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
