/* How it works, step 4 (Earn): Reach's own console, its admin, drawn in Reach's look C (a cool
   canvas, white panes, one ink, green only for live and going up), clicked through: Overview,
   People, Sending, Money, Workspaces and Overview again. how.js sets the page it's on and the
   pointer's place as data-now. Reach's colors are its own (reach/design/theme.ts), named once
   here, as apps.css carries each customer app's colors. */

.ea-win {
  --r-canvas: #eef0f3;
  --r-panel: #ffffff;
  --r-wash: #e9ebef;
  --r-strong: #121417;
  --r-body: #2a2e35;
  --r-muted: #555b64;
  --r-hair: #e6e8ec;
  --r-live: #17885a;
  --r-up: #0f6a45;
  --r-raised: 0 0 0 1px rgba(18, 20, 23, 0.05), 0 1px 2px rgba(18, 20, 23, 0.06);
  --r-pane:
    0 0 0 1px rgba(18, 20, 23, 0.035), 0 1px 2px rgba(18, 20, 23, 0.04),
    0 8px 24px -10px rgba(18, 20, 23, 0.1);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-window);
  background: var(--r-canvas);
  box-shadow: var(--shadow-window);
  color: var(--r-body);
  font-size: 13px;
  line-height: 18px;
  letter-spacing: -0.006em;
  text-align: start;
}
.ea-app {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  grid-template-rows: 56px minmax(0, 1fr);
  grid-template-areas:
    "top top"
    "rail main";
}

/* The top: Reach, live, and the figures said to be an example */
.ea-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
}
.ea-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--r-strong);
  color: var(--r-panel);
}
.ea-top b {
  font-size: 15px;
  font-weight: 620;
  color: var(--r-strong);
}
.ea-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--r-panel);
  box-shadow: var(--r-raised);
  font-size: 12px;
  font-weight: 560;
  color: var(--r-strong);
}
.ea-live i,
.ea-st i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--r-live);
}
.ea-ex {
  flex: none;
  margin-inline-start: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--r-wash);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: var(--r-body);
}

/* The rail: the page it's on is a raised pane */
.ea-rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 4px 12px 16px;
  list-style: none;
}
.ea-rail li {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--r-muted);
  transition:
    background 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out),
    color 200ms var(--ease-out);
}
.ea-app[data-now="ov"] .r-ov,
.ea-app[data-now="people"] .r-people,
.ea-app[data-now="sending"] .r-sending,
.ea-app[data-now="money"] .r-money,
.ea-app[data-now="ws"] .r-ws {
  background: var(--r-panel);
  box-shadow: var(--r-raised);
  font-weight: 560;
  color: var(--r-strong);
}
.ea-rail .r-set {
  margin-top: auto;
}

/* The pointer: it moves to a page a moment before the page opens */
.ea-cur {
  --cx: 62%;
  --cy: 60%;
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  z-index: 5;
  pointer-events: none;
  transition:
    left 650ms var(--ease-out),
    top 650ms var(--ease-out);
}
.ea-cur svg {
  width: 20px;
  height: 20px;
  fill: var(--r-strong);
  stroke: var(--r-panel);
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(18, 20, 23, 0.25));
}
.ea-cur[data-now="ov"] {
  --cx: 96px;
  --cy: 74px;
}
.ea-cur[data-now="ws"] {
  --cx: 96px;
  --cy: 112px;
}
.ea-cur[data-now="people"] {
  --cx: 96px;
  --cy: 150px;
}
.ea-cur[data-now="sending"] {
  --cx: 96px;
  --cy: 188px;
}
.ea-cur[data-now="money"] {
  --cx: 96px;
  --cy: 226px;
}
.hw:not(.js) .ea-cur {
  display: none;
}

/* The pages: one at a time, in the same place */
.ea-main {
  grid-area: main;
  position: relative;
  min-height: 0;
}
.ea-pg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  padding: 0 20px 20px 8px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 300ms var(--ease-out),
    visibility 0s 300ms;
}
.ea-app[data-now="ov"] .p-ov,
.ea-app[data-now="people"] .p-people,
.ea-app[data-now="sending"] .p-sending,
.ea-app[data-now="money"] .p-money,
.ea-app[data-now="ws"] .p-ws {
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms var(--ease-out);
}
.p-ov {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.ea-head {
  grid-column: 1 / -1;
  padding: 0 2px 2px;
}
.ea-head b {
  display: block;
  font-size: 22px;
  line-height: 28px;
  font-weight: 650;
  letter-spacing: -0.018em;
  color: var(--r-strong);
}
.ea-head small,
.ea-card small,
.ea-card .ea-sub,
.ea-chart > small,
.ea-feed > small,
.ea-list > small {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--r-muted);
}
.ea-card small,
.ea-chart > small,
.ea-feed > small,
.ea-list > small {
  font-weight: 560;
}
.ea-card,
.ea-chart,
.ea-feed,
.ea-list {
  min-width: 0;
  border-radius: 12px;
  background: var(--r-panel);
  box-shadow: var(--r-pane);
}

/* Narrower: the rail keeps only its icons */
@container (max-width: 960px) {
  .ea-app {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .ea-rail {
    padding-inline: 10px;
  }
  .ea-rail li {
    justify-content: center;
    padding: 0;
  }
  .ea-rail span,
  .ea-card .wd {
    display: none;
  }
  .ea-cur[data-now]:not([data-now="rest"]) {
    --cx: 30px;
  }
}

/* On a phone: the rail is a row of icons under the top, and the pointer gives way to the row's
   own highlight */
@container (max-width: 680px) {
  .ea-win {
    height: 100%;
  }
  .ea-app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 48px 44px minmax(0, 1fr);
    grid-template-areas:
      "top"
      "rail"
      "main";
  }
  .ea-top {
    padding-inline: 16px;
  }
  .ea-rail {
    flex-direction: row;
    gap: 4px;
    padding: 0 12px 8px;
  }
  .ea-rail li {
    width: 44px;
  }
  .ea-rail .r-set,
  .ea-cur {
    display: none;
  }
  .ea-pg {
    gap: 8px;
    padding: 0 12px 12px;
  }
  .p-ov {
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }
  .ea-head b {
    font-size: 19px;
    line-height: 24px;
  }
}
