/* The signed-in pages (FLOWS.md). Dark only, one accent, one 6px radius, like the site. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #111214;
  --surface: #18191c;
  --raised: #23252a;
  --dim: #1b1c1f;
  --line: #2a2c30;
  --line-strong: #3b3e43;
  --text: #ecece9;
  --text-2: #b7b9bd;
  --text-3: #8f9298;
  --accent: #f28a4a;
  --accent-ink: #1c0e05;
  --accent-soft: rgb(242 138 74 / 0.11);
  --accent-line: rgb(242 138 74 / 0.5);
  --ok: #5cc47e;
  --ok-soft: rgb(92 196 126 / 0.09);
  --ok-line: rgb(92 196 126 / 0.45);
  --bad: #f0838b;
  --bad-ink: #2a0b0e;
  --bad-soft: rgb(240 131 139 / 0.09);
  --bad-line: rgb(240 131 139 / 0.45);
  --display: "Bricolage Grotesque", "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
}
h1,
h2,
h3,
p,
ul {
  margin: 0;
}
ul {
  list-style: none;
  padding: 0;
}
a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button {
  font: inherit;
  color: inherit;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.mono {
  font-family: var(--mono);
  font-size: 13px;
}
.muted {
  color: var(--text-3);
}
.soft {
  color: var(--text-2);
}

/* Header */
.top {
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text);
}
.wordmark:hover {
  color: var(--text);
}
.wordmark span span {
  font-weight: 500;
  color: var(--text-3);
}
.top-left {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.slash {
  color: var(--line-strong);
  font-size: 22px;
  font-weight: 300;
}
/* The account switcher (FLOWS.md, "Switching accounts"). */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  min-width: 0;
  padding: 0 10px 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: 600 15px/1.55 var(--sans);
  cursor: pointer;
}
.switch svg {
  color: var(--text-3);
}
.switch:hover,
.switch[aria-expanded="true"] {
  border-color: var(--line-strong);
}
.switch .avatar.small {
  width: 26px;
  height: 26px;
}
.switch-menu {
  position: absolute;
  top: 48px;
  left: 0;
  z-index: 10;
  width: min(300px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
}
.switch-menu > .label {
  padding: 10px 10px 4px;
  font-size: 13px;
}
.switch-menu hr {
  height: 1px;
  margin: 6px 4px;
  border: 0;
  background: var(--line);
}
.switch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 15px;
  text-decoration: none;
  color: var(--text);
}
.switch-item:hover,
.switch-item:focus-visible,
.switch-item[aria-current="page"] {
  background: var(--raised);
  color: var(--text);
}
.switch-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.switch-name > span:first-child {
  font-weight: 600;
}
.switch-name .label {
  font-size: 13px;
}
.switch-item .check {
  flex: none;
  margin-left: auto;
  color: var(--accent);
}
.who {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--text-2);
}
.who-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.who a,
.who button {
  color: var(--text-2);
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover {
  color: var(--accent);
}

/* Avatars: organizations square, people round, as on GitHub. */
.avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Covers the initial under a picture with transparent parts. */
  background: inherit;
}
.avatar.faded img {
  opacity: 0.6;
}
.avatar.round {
  border-radius: 50%;
  background: var(--line);
  border: 0;
}
.avatar.small {
  width: 28px;
  height: 28px;
  font-size: 12px;
}
.avatar.medium {
  width: 32px;
  height: 32px;
  font-size: 13px;
}
.avatar.large {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  font-size: 20px;
}
.avatar.large.round {
  border-radius: 50%;
}
.avatar.faded {
  background: var(--dim);
  border-color: var(--line);
  color: var(--text-3);
}

/* Footer: at the bottom of the window on a short page, after the content on a long one. */
#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
#app > main {
  width: 100%;
}
.bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-3);
}
.bottom-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 24px;
}
.bottom a {
  color: var(--text-2);
}
.bottom nav {
  display: flex;
  gap: 20px;
}

/* Page frame */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}
.page.roomy {
  padding-top: 56px;
}
.narrow {
  max-width: 880px;
}
.eyebrow {
  font: 600 13px/1.55 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.title {
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.title.short {
  max-width: 16ch;
}
.title.account {
  font-size: clamp(32px, 4.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.lede {
  margin-top: 16px;
  max-width: 58ch;
  font-size: 18px;
  color: var(--text-2);
}
.crumbs {
  font-size: 14px;
  color: var(--text-3);
}
.crumbs a {
  color: var(--text-2);
}
.heading {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.label {
  font-size: 14px;
  color: var(--text-3);
}
.note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-3);
}
.split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px 48px;
}
.split > .main {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.split > .side {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Plan and billing: the plan's facts come first on a phone, and sit on the right on a wide screen. */
.split.billing {
  flex-direction: row-reverse;
}
.card-part {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.button.quiet.bad {
  padding: 0;
  color: var(--bad);
}
.tabs {
  margin-top: 10px;
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.tab {
  height: 42px;
  margin-bottom: -1px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-3);
  font: 600 15px/1.55 var(--sans);
  cursor: pointer;
}
.tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.identity {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.identity p {
  font-size: 15px;
  color: var(--text-3);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 650 15px/1.55 var(--sans);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  color: var(--accent-ink);
  filter: brightness(1.06);
}
.button.outline {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-weight: 600;
}
.button.outline:hover {
  color: var(--text);
  border-color: var(--text-3);
  filter: none;
}
.button.danger {
  background: var(--bad);
  color: var(--bad-ink);
}
.button.quiet {
  height: 36px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: 600 14px/1.55 var(--sans);
}
.button.quiet.accent {
  color: var(--accent);
}
.button.small {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}
.button.block {
  display: flex;
  width: 100%;
}
.button:disabled,
.button[aria-disabled="true"] {
  cursor: default;
  opacity: 0.6;
  filter: saturate(0.6);
}
/* The ↗ after a link out: grey, except on filled buttons. */
.external {
  color: var(--text-3);
}
.button:not(.outline) .external {
  color: inherit;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.error-line {
  margin-top: 10px;
  font-size: 14px;
  color: var(--bad);
}

/* Lists of accounts and PRs */
.rows {
  border-top: 1px solid var(--line);
}
.rows > li {
  border-bottom: 1px solid var(--line);
}
.account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 32px;
  padding: 22px 8px;
  text-decoration: none;
  color: var(--text);
}
a.account-row:hover {
  color: var(--text);
  background: rgb(255 255 255 / 0.015);
}
.account-who {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.account-who > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.account-name {
  font-weight: 650;
  font-size: 17px;
}
.account-kind {
  font-size: 14px;
  color: var(--text-3);
}
.account-state {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.state-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
}
/* A removed account's runs: there, but nothing can use them until it's installed again. */
.account-state.off .state-line strong {
  color: var(--text-2);
}
.account-state.off .bar > span,
.card.off .bar > span,
.card.off .batches > li .dot {
  background: #5c5f66;
}
.state-line strong {
  font-weight: 600;
  font-size: 15px;
}
.chevron {
  flex: none;
  color: var(--text-3);
  font-size: 20px;
}
/* On a phone the row wraps, and the whole row is the link anyway. */
@media (max-width: 640px) {
  .chevron {
    display: none;
  }
}
.member-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 8px;
  text-decoration: none;
  color: var(--text);
}
.member-row:hover {
  color: var(--text);
  background: rgb(255 255 255 / 0.015);
}
.member-row > span:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.member-row .avatar {
  color: var(--text-2);
}
.item-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 14px 8px;
}
.item-row .title-link {
  font-weight: 600;
  text-decoration: none;
}
.item-row .when {
  font-size: 15px;
  white-space: nowrap;
  color: var(--text-2);
}
.item-row .when.free {
  color: var(--text-3);
}
.running {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent);
}
.running::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(242 138 74 / 0.2);
}
.failed {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 15px;
  color: var(--text-3);
}
.failed .link-button {
  color: var(--text);
  font-weight: 600;
}
/* Shrinks before the status does, so a long title wraps instead of pushing the status under it. */
.item-row > .row-title {
  flex: 1 1 18rem;
  min-width: 0;
}
.pick {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 8px;
  cursor: pointer;
}
.pick input {
  flex: none;
  margin: 3px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.pick.off {
  opacity: 0.55;
  cursor: default;
}
.pick > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pick strong {
  font-weight: 600;
}
.pick small {
  font-size: 14px;
  color: var(--text-3);
}
.pick .mono {
  color: var(--text-2);
}

/* Bars and pills */
.bar {
  display: flex;
  gap: 2px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
/* Each batch's part of the bar, and its dot, in the order runs are used: the accent, then lighter, then deeper. */
.bar > span,
.batches .dot {
  background: var(--accent);
}
.bar > span:nth-child(2),
.batches > li:nth-child(2) .dot {
  background: #f7c3a0;
}
.bar > span:nth-child(n + 3),
.batches > li:nth-child(n + 3) .dot {
  background: #c2410c;
}
.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}
.pill.neutral {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
}

/* Cards and notices */
.card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
}
.card.filled {
  background: var(--surface);
}
.card .big {
  margin-top: 4px;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 800;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.card .plan-name {
  margin-top: 2px;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 800;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 20px;
  min-height: 62px;
  padding: 12px 12px 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 15px;
}
.notice.ok {
  border-color: var(--ok-line);
  background: var(--ok-soft);
}
.notice.ok strong {
  font-weight: 650;
  color: var(--ok);
}
.notice.alert {
  margin-top: 28px;
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.notice.alert strong {
  font-weight: 650;
  color: var(--accent);
}
.notice.danger {
  border-color: var(--bad-line);
  background: var(--bad-soft);
}
/* Confirmations: a modal <dialog> near the top, over the dimmed page. */
.dialog {
  width: calc(100% - 32px);
  max-width: 440px;
  margin: 18vh auto auto;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.5);
}
.dialog::backdrop {
  background: rgb(8 9 10 / 0.72);
}
.dialog h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.dialog-body {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-2);
}
.dialog-rows {
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.dialog-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.dialog-rows dt {
  color: var(--text-2);
}
.dialog-rows dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.dialog .buttons {
  margin-top: 24px;
  justify-content: flex-end;
}

/* Runs */
.runs-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}
.runs-total span:first-child {
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 800;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.runs-total span:last-child {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-2);
}
.runs-total + .bar {
  margin-top: 20px;
  height: 8px;
  border-radius: 4px;
}
.batches {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.batches .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 2px;
  vertical-align: 1px;
}
.batch-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font-size: 15px;
}
.batch-line strong {
  font-weight: 600;
}

/* Plans */
.plans {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.plan {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 22px;
}
.plans.four .plan {
  flex-basis: 170px;
}
.plans.four .plan .button {
  padding: 0 14px;
}
.plans.change .plan {
  flex-basis: 220px;
}
.plan.current {
  border-color: rgb(242 138 74 / 0.6);
}
.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}
.plan h3 {
  font-size: 16px;
  font-weight: 650;
}
.plan .price {
  margin-top: 6px;
}
.plan .price span:first-child {
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.plans.four .plan .price span:first-child {
  font-size: 36px;
}
.plan .price span:last-child,
.plan .per {
  font-size: 15px;
  color: var(--text-2);
}
.plans.four .plan .price span:last-child {
  font-size: 14px;
}
.plan .button,
.plan .status {
  margin-top: 16px;
}
.plan .status {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  font-size: 15px;
  color: var(--text-3);
}
.plan-list {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.plan-list li {
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.plan-list li > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.plan-list strong {
  font-weight: 600;
}
.plan-list small {
  font-size: 14px;
  color: var(--text-3);
}

/* Suggested plan */
.plan.suggested {
  border-color: rgb(242 138 74 / 0.6);
}

/* Loading and empty states */
.placeholder {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface), var(--raised), var(--surface));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .placeholder {
    animation: none;
  }
}
.empty {
  padding: 18px 8px;
  font-size: 15px;
  color: var(--text-2);
}
.problem {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

/* Checkout (FLOWS.md, "Checkout"): Stripe's form, full width. */
.stripe-checkout {
  margin-top: 28px;
}

/* Invoices on the plan page. */
.invoice-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  padding: 12px 8px;
  font-size: 15px;
}
.invoice-row .when {
  flex: 0 0 72px;
  color: var(--text-2);
  white-space: nowrap;
}
.invoice-what {
  flex: 1 1 160px;
  min-width: 0;
}
.invoice-what strong {
  font-weight: 600;
}
.invoice-what .mono {
  font-size: 13px;
}
.invoice-amount {
  flex: none;
  font-variant-numeric: tabular-nums;
}
.invoice-links {
  flex: none;
  margin-left: auto;
  display: inline-flex;
  gap: 16px;
  font-size: 14px;
}
