/* Round 136, Raven logs (Figma section "NOW: Round 136": L136a Logs 1511:8794, L136b Deploys 1512:8794, L136c the
   build log popup 1512:9079, L136d sign-in 1512:9291, L136e wrong password 1512:9323, L136f paused + range menu
   1516:8796). Raven's tokens (design/DESIGN.md) and the admin's round 4 grammar; every value is the frame's. */

@font-face {
  font-family: 'Geist';
  src: url(fonts/geist-latin-wght-normal.woff2) format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url(fonts/geist-mono-latin-wght-normal.woff2) format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #000000;
  --surface-1: #111111;
  --surface-2: #1a1a1a;
  --line: rgb(255 255 255 / 0.08);
  --row-line: rgb(255 255 255 / 0.06);
  --text: #f2f2f2;
  --text-2: #adadad;
  --text-3: #8a8a8a;
  --accent: #f5f5f5;
  --accent-hover: #dbdbdb;
  --on-accent: #0a0a0a;
  --danger: #ff666a;
  --warn: #f7b83d;
  --font: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --ease-pop: cubic-bezier(0.2, 0.9, 0.3, 1.1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/20px var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html {
  scrollbar-gutter: stable;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
img {
  display: block;
  flex: none;
}
[hidden] {
  display: none !important;
}
.grow {
  flex: 1;
  min-width: 0;
}
:focus-visible {
  outline: 2px solid rgb(255 255 255 / 0.5);
  outline-offset: 2px;
}

/* ---------- L136d / L136e the sign-in ---------- */
.gate {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 80px 16px;
}
.gate-logo {
  position: absolute;
  left: 40px;
  top: 34px;
}
.gate-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 360px;
  max-width: 100%;
  animation: rise 360ms var(--ease-out) both;
}
.gate-icon {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 19px;
  background: #0a0a0a;
  box-shadow: inset 0 0 0 0.833px rgb(255 255 255 / 0.14);
}
.gate-icon img {
  position: absolute;
  left: 23.33px;
  top: 20.83px;
}
.gate-title {
  margin: 28px 0 0;
  font-size: 24px;
  line-height: 30px;
  font-weight: 600;
  text-align: center;
}
.gate-sub {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--text-2);
  text-align: center;
}
.gate-field {
  width: 100%;
  height: 48px;
  margin-top: 28px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: #0b0b0b;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.14);
  color: var(--text);
  caret-color: var(--text);
  font: 400 14px/20px var(--font);
  letter-spacing: 1px;
  outline: 0;
  transition: box-shadow 160ms ease;
}
.gate-field:focus {
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.32);
}
.gate-field.wrong {
  box-shadow: inset 0 0 0 1.5px var(--danger);
  animation: nudge 280ms ease;
}
.gate-err {
  margin: 8px 0 0;
  width: 100%;
  font-size: 13px;
  line-height: 18px;
  color: var(--danger);
  text-align: center;
}
.gate-btn {
  width: 100%;
  height: 48px;
  margin-top: 24px;
  border-radius: 24px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  transition: background-color 160ms ease, transform 120ms ease;
}
.gate-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}
.gate-btn:active:not(:disabled) {
  transform: scale(0.98);
}
.gate-btn:disabled {
  background: #262626;
  color: var(--text-3);
  cursor: default;
}

/* ---------- L136a / L136b the shell ---------- */
.app {
  display: flex;
  min-height: 100vh;
}
.side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  flex: none;
  width: 220px;
  height: 100vh;
  padding: 0 12px;
  box-shadow: inset -1px 0 0 var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 64px;
  padding: 0 12px;
}
.lockup {
  position: relative;
  display: block;
  width: 75.42px;
  height: 28px;
}
.lockup img {
  position: absolute;
  left: 0;
  top: 1.14px;
}
.lockup span {
  position: absolute;
  left: 23.42px;
  top: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.brand-tag {
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-3);
}
.views {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-2);
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}
.nav:hover {
  background: rgb(255 255 255 / 0.06);
}
.nav[aria-current='page'] {
  background: rgb(255 255 255 / 0.08);
  color: var(--text);
  font-weight: 500;
}
/* The nav pictures are the frame's own SVGs, used as masks so the open page's turns white. */
.nav-icon {
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--icon) center / 16px 16px no-repeat;
  mask: var(--icon) center / 16px 16px no-repeat;
}
.nav-icon.logs {
  --icon: url(icons/nav-logs.svg);
}
.nav-icon.deploys {
  --icon: url(icons/nav-deploys.svg);
}
.nav.foot {
  margin-bottom: 16px;
}

.right {
  flex: 1;
  min-width: 0;
  padding: 0 32px 24px;
}
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  background: var(--bg);
}
.title {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  white-space: nowrap;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 360px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface-1);
  cursor: text;
  transition: box-shadow 120ms ease;
}
.search:focus-within {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.36);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder {
  color: var(--text-3);
}
.search input::-webkit-search-cancel-button {
  display: none;
}
.key {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgb(255 255 255 / 0.08);
  font: 500 12px/16px var(--font);
  color: var(--text-2);
}
.search:focus-within .key {
  opacity: 0;
}

.bar {
  position: sticky;
  top: 64px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0 16px;
  background: var(--bg);
}
.tabs {
  display: flex;
  gap: 4px;
}
.tab {
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease;
}
.tab:hover {
  color: var(--text);
}
.tab[aria-selected='true'] {
  background: rgb(255 255 255 / 0.1);
  color: var(--text);
}
.controls {
  display: flex;
  gap: 8px;
}
.btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px 0 12px;
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.btn:hover {
  background: #222222;
}
.btn:active {
  transform: scale(0.97);
}
.btn.picker {
  gap: 8px;
  padding: 0 12px;
}
.btn[aria-expanded='true'] {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.32);
}
.anchor {
  position: relative;
}
/* L136f: the range menu, the admin's menu surface. */
.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 200px;
  padding: 8px;
  border-radius: 14px;
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1), 0 24px 64px rgb(0 0 0 / 0.6), 0 2px 8px rgb(0 0 0 / 0.4);
  transform-origin: top right;
  animation: pop 200ms var(--ease-pop);
}
.menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  text-align: left;
  white-space: nowrap;
}
.menu button:hover,
.menu button:focus-visible {
  background: rgb(255 255 255 / 0.06);
  outline: 0;
}

/* The list: a head, day labels, one row a line. */
.head,
.row {
  display: grid;
  grid-template-columns: 96px 132px minmax(0, 1fr) 96px;
}
.list.deploys .head,
.list.deploys .row {
  grid-template-columns: 96px 160px minmax(0, 1fr) 96px 80px;
}
.head {
  position: sticky;
  top: 120px;
  z-index: 3;
  height: 44px;
  align-items: center;
  background: var(--bg);
  box-shadow: inset 0 -1px 0 var(--line);
  font-size: 12px;
  line-height: 16px;
  color: var(--text-3);
}
.right-end {
  text-align: right;
}
.rows {
  padding-top: 4px;
}
.day {
  padding: 16px 0 6px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-3);
}
.row {
  align-items: start;
  box-shadow: inset 0 -1px 0 var(--row-line);
}
.row.fresh {
  animation: fresh 600ms var(--ease-out);
}
.list.deploys .row {
  cursor: pointer;
  border-radius: 0;
  transition: background-color 120ms ease;
}
.list.deploys .row:hover {
  background: rgb(255 255 255 / 0.03);
}
.c-mono {
  padding: 11px 0;
  font: 400 13px/18px var(--mono);
  font-variant-ligatures: none;
  color: var(--text-3);
  white-space: nowrap;
}
.c-word {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  white-space: nowrap;
  color: var(--text-2);
}
.c-msg {
  padding: 11px 0;
  font: 400 13px/18px var(--mono);
  font-variant-ligatures: none;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}
.c-what {
  padding: 10px 24px 10px 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.c-what.quiet {
  color: var(--text-2);
}
.c-num {
  padding: 10px 0;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.c-mono.right-end {
  text-align: right;
}
.is-error {
  color: var(--danger);
}
.is-warn {
  color: var(--warn);
}
.is-live {
  color: var(--text);
}
.is-quiet {
  color: var(--text-3);
}
.spin {
  animation: spin 1s linear infinite;
}
.end {
  margin: 0;
  padding-top: 16px;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-3);
}
.end.error {
  color: var(--danger);
}

/* ---------- L136c the build log popup ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgb(0 0 0 / 0.6);
  animation: fade 200ms ease;
}
.pop {
  display: flex;
  flex-direction: column;
  width: 800px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  padding: 20px 24px 24px;
  border-radius: 24px;
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--line);
  outline: 0;
  animation: pop 220ms var(--ease-pop);
}
.pop-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.pop-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}
.pop-title {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.facts {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-2);
  white-space: pre;
}
.close {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  transition: background-color 120ms ease;
}
.close::after {
  content: '';
  position: absolute;
  inset: -6px;
}
.close:hover {
  background: rgb(255 255 255 / 0.06);
}
.pop-lines {
  margin-top: 20px;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  font: 400 13px/18px var(--mono);
  font-variant-ligatures: none;
}
.pl {
  display: flex;
  gap: 16px;
  padding: 3px 0;
}
.pl time {
  flex: none;
  color: var(--text-3);
}
.pl span {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pop-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}
.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 500;
  transition: background-color 120ms ease, transform 120ms ease;
}
.pill:hover {
  background: #222222;
}
.pill:active {
  transform: scale(0.97);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(4px);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes fresh {
  from {
    background: rgb(255 255 255 / 0.06);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes nudge {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* Narrow windows: the sidebar keeps its pictures, the instance and commit columns go. */
@media (max-width: 900px) {
  .side {
    width: 64px;
  }
  .brand-tag,
  .lockup span,
  .nav span:not(.nav-icon) {
    display: none;
  }
  .lockup {
    width: 18px;
  }
  .brand,
  .nav {
    justify-content: center;
    padding: 0;
  }
  .right {
    padding: 0 16px 24px;
  }
  .search {
    width: auto;
    flex: 1;
  }
  .head,
  .row {
    grid-template-columns: 80px 104px minmax(0, 1fr);
  }
  .list.deploys .head,
  .list.deploys .row {
    grid-template-columns: 64px 120px minmax(0, 1fr) 72px;
  }
  .head > :nth-child(4),
  .row > :nth-child(4) {
    display: none;
  }
  .list.deploys .head > :nth-child(4),
  .list.deploys .row > :nth-child(4) {
    display: none;
  }
  .list.deploys .head > :nth-child(5),
  .list.deploys .row > :nth-child(5) {
    display: block;
  }
}
@media (max-width: 560px) {
  .bar {
    flex-wrap: wrap;
  }
  .gate-logo {
    left: 16px;
    top: 20px;
  }
}
